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

This commit is contained in:
Zuul 2020-08-06 22:37:35 +00:00 committed by Gerrit Code Review
commit b434f339e3
1 changed files with 12 additions and 9 deletions

View File

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