Merge "Do state report after setting start_flag on OVS restart"
This commit is contained in:
commit
cc7b30bda9
@ -2071,6 +2071,9 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
||||
self.setup_tunnel_br()
|
||||
self.setup_tunnel_br_flows()
|
||||
self.agent_state['start_flag'] = True
|
||||
# Force state report to avoid race condition
|
||||
# with l2pop fdb entries update
|
||||
self._report_state()
|
||||
if self.enable_distributed_routing:
|
||||
self.dvr_agent.reset_ovs_parameters(self.int_br,
|
||||
self.tun_br,
|
||||
|
@ -2049,7 +2049,9 @@ class TestOvsNeutronAgent(object):
|
||||
mock.patch.object(
|
||||
self.mod_agent.OVSNeutronAgent,
|
||||
'_reset_tunnel_ofports') as reset_tunnel_ofports, \
|
||||
mock.patch.object(self.agent.ovs.ovsdb, 'idl_monitor'):
|
||||
mock.patch.object(self.agent.ovs.ovsdb, 'idl_monitor'),\
|
||||
mock.patch.object(self.agent.state_rpc,
|
||||
'report_state') as report_st:
|
||||
log_exception.side_effect = Exception(
|
||||
'Fake exception to get out of the loop')
|
||||
devices_not_ready = set()
|
||||
@ -2097,7 +2099,9 @@ class TestOvsNeutronAgent(object):
|
||||
self.assertTrue(setup_tunnel_br_flows.called)
|
||||
self.assertTrue(setup_tunnel_br.called)
|
||||
if self.agent.enable_tunneling:
|
||||
self.assertTrue(self.agent.agent_state.get('start_flag'))
|
||||
self.agent.agent_state['start_flag'] = True
|
||||
report_st.assert_called_once_with(
|
||||
self.agent.context, self.agent.agent_state, True)
|
||||
|
||||
def test_ovs_status(self):
|
||||
self._test_ovs_status(constants.OVS_NORMAL,
|
||||
|
Loading…
Reference in New Issue
Block a user