OVS and OF Agents: Create updated_ports attribute before setup_rpc

setup_rpc spawns rpc-consuming thread that can access
self.updated_ports before it is created in the constructor

Change-Id: Icc447c3bb7099125aae30e2430a6ad98ba00f6f9
Closes-Bug: #1314472
(cherry picked from commit 717a0a0ab4)
This commit is contained in:
Eugene Nikanorov 2014-04-30 16:04:58 +04:00 committed by Kyle Mestery
parent 9268ea6227
commit 77d8da1ca4
2 changed files with 4 additions and 4 deletions

View File

@ -249,6 +249,8 @@ class OFANeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
self.int_br_device_count = 0
self.int_br = OVSBridge(integ_br, self.root_helper, self.ryuapp)
# Stores port update notifications for processing in main loop
self.updated_ports = set()
self.setup_rpc()
self.setup_integration_br()
self.setup_physical_bridges(bridge_mappings)
@ -274,8 +276,6 @@ class OFANeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
self.sg_agent = OFASecurityGroupAgent(self.context,
self.plugin_rpc,
self.root_helper)
# Stores port update notifications for processing in main loop
self.updated_ports = set()
# Initialize iteration counter
self.iter_num = 0

View File

@ -193,6 +193,8 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
self.int_br_device_count = 0
self.int_br = ovs_lib.OVSBridge(integ_br, self.root_helper)
# Stores port update notifications for processing in main rpc loop
self.updated_ports = set()
self.setup_rpc()
self.setup_integration_br()
self.bridge_mappings = bridge_mappings
@ -223,8 +225,6 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
self.sg_agent = OVSSecurityGroupAgent(self.context,
self.plugin_rpc,
root_helper)
# Stores port update notifications for processing in main rpc loop
self.updated_ports = set()
# Initialize iteration counter
self.iter_num = 0