Consume FWaaS plugin queue in RPC workers
This patch adds all RPC workers to consumers of FWaaS plugin queue.
This is important for DVR-enabled deployments with hundreds
of agents.
Change-Id: I656ef6248379c845c4c7862fabd26eedd8b7fd46
Depends-On: I6fea7f409c91b25d2c35b038d6100fdfa85d1905
Related-Bug: #1498844
(cherry picked from commit bda2c484cb
)
This commit is contained in:
parent
33c06d9c70
commit
d578ac729c
|
@ -145,12 +145,7 @@ class FirewallPlugin(
|
|||
|
||||
def __init__(self):
|
||||
"""Do the initialization for the firewall service plugin here."""
|
||||
self.endpoints = [FirewallCallbacks(self)]
|
||||
|
||||
self.conn = n_rpc.create_connection(new=True)
|
||||
self.conn.create_consumer(
|
||||
topics.FIREWALL_PLUGIN, self.endpoints, fanout=False)
|
||||
self.conn.consume_in_threads()
|
||||
self.start_rpc_listeners()
|
||||
|
||||
self.agent_rpc = FirewallAgentApi(
|
||||
topics.L3_AGENT,
|
||||
|
@ -158,6 +153,14 @@ class FirewallPlugin(
|
|||
)
|
||||
firewall_db.subscribe()
|
||||
|
||||
def start_rpc_listeners(self):
|
||||
self.endpoints = [FirewallCallbacks(self)]
|
||||
|
||||
self.conn = n_rpc.create_connection(new=True)
|
||||
self.conn.create_consumer(
|
||||
topics.FIREWALL_PLUGIN, self.endpoints, fanout=False)
|
||||
return self.conn.consume_in_threads()
|
||||
|
||||
def _rpc_update_firewall(self, context, firewall_id):
|
||||
status_update = {"firewall": {"status": const.PENDING_UPDATE}}
|
||||
super(FirewallPlugin, self).update_firewall(context, firewall_id,
|
||||
|
|
Loading…
Reference in New Issue