Don't check if any bridges were recrected when OVS was restarted
In case when openvswitch was restarted, full sync of all bridges will be always triggered by neutron-ovs-agent so there is no need to check in same rpc_loop iteration if bridges were recreated. Change-Id: I3cc1f1b7dc480d54a7cee369e4638f9fd597c759 Related-bug: #1864822
This commit is contained in:
parent
91f0bf3c85
commit
45482e300a
|
@ -2529,6 +2529,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._handle_ovs_restart(polling_manager)
|
self._handle_ovs_restart(polling_manager)
|
||||||
tunnel_sync = self.enable_tunneling or tunnel_sync
|
tunnel_sync = self.enable_tunneling or tunnel_sync
|
||||||
|
@ -2539,15 +2540,17 @@ 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:
|
||||||
added_bridges = idl_monitor.bridges_added + self.added_bridges
|
# Check if any physical bridge wasn't recreated recently,
|
||||||
bridges_recreated = self._reconfigure_physical_bridges(
|
# in case when openvswitch was restarted, it's not needed
|
||||||
added_bridges)
|
added_bridges = idl_monitor.bridges_added + self.added_bridges
|
||||||
if bridges_recreated:
|
bridges_recreated = self._reconfigure_physical_bridges(
|
||||||
# In case when any bridge was "re-created", we need to ensure
|
added_bridges)
|
||||||
# that there is no any stale flows in bridges left
|
if bridges_recreated:
|
||||||
need_clean_stale_flow = True
|
# In case when any bridge was "re-created", we need to
|
||||||
sync |= bridges_recreated
|
# 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
|
# Notify the plugin of tunnel IP
|
||||||
if self.enable_tunneling and tunnel_sync:
|
if self.enable_tunneling and tunnel_sync:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue