Merge "Don't check if any bridges were recrected when OVS was restarted" into stable/queens

This commit is contained in:
Zuul 2020-08-06 22:20:04 +00:00 committed by Gerrit Code Review
commit 540b1a7673
1 changed files with 14 additions and 11 deletions

View File

@ -2202,6 +2202,7 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
LOG.info("Agent rpc_loop - iteration:%d started", LOG.info("Agent rpc_loop - iteration:%d started",
self.iter_num) self.iter_num)
ovs_status = self.check_ovs_status() ovs_status = self.check_ovs_status()
bridges_recreated = False
if ovs_status == constants.OVS_RESTARTED: if ovs_status == constants.OVS_RESTARTED:
self.setup_integration_br() self.setup_integration_br()
self.setup_physical_bridges(self.bridge_mappings) self.setup_physical_bridges(self.bridge_mappings)
@ -2239,17 +2240,19 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
port_stats = self.get_port_stats({}, {}) port_stats = self.get_port_stats({}, {})
self.loop_count_and_wait(start, port_stats) self.loop_count_and_wait(start, port_stats)
continue continue
# Check if any physical bridge wasn't recreated recently else:
if bridges_monitor: # Check if any physical bridge wasn't recreated recently
added_bridges = ( if bridges_monitor:
bridges_monitor.bridges_added + self.added_bridges) added_bridges = (
bridges_recreated = self._reconfigure_physical_bridges( bridges_monitor.bridges_added + self.added_bridges)
added_bridges) bridges_recreated = self._reconfigure_physical_bridges(
if bridges_recreated: added_bridges)
# In case when any bridge was "re-created", we need to if bridges_recreated:
# ensure that there is no any stale flows in bridges left # In case when any bridge was "re-created", we need to
need_clean_stale_flow = True # ensure that there is no any stale flows in bridges
sync |= bridges_recreated # left
need_clean_stale_flow = True
sync |= bridges_recreated
# Notify the plugin of tunnel IP # Notify the plugin of tunnel IP
if self.enable_tunneling and tunnel_sync: if self.enable_tunneling and tunnel_sync:
try: try: