Call install_ingress_direct_goto_flows() when ovs restarts
When ovs restarts and needs to regenerate flows, some flows will be missing in br-int, as follows: * table=60,priority=4,in_port="int-br-floating" actions=resubmit(,61) * table=60,priority=4,in_port="patch-tun" actions=resubmit(,61) * table=61,priority=0 actions=resubmit(,62) Call install_ingress_direct_goto_flows() again in the _handle_ovs_restart() to ensure generate these flows. Change-Id: I240a78879db757592df138a53b2c22d7f5a9ae13 Closes-Bug: #1920700
This commit is contained in:
parent
1740524999
commit
2bb52d49be
@ -2522,6 +2522,7 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
|||||||
|
|
||||||
def _handle_ovs_restart(self, polling_manager):
|
def _handle_ovs_restart(self, polling_manager):
|
||||||
self.setup_integration_br()
|
self.setup_integration_br()
|
||||||
|
self.install_ingress_direct_goto_flows()
|
||||||
self.setup_physical_bridges(self.bridge_mappings)
|
self.setup_physical_bridges(self.bridge_mappings)
|
||||||
if self.enable_tunneling:
|
if self.enable_tunneling:
|
||||||
self._reset_tunnel_ofports()
|
self._reset_tunnel_ofports()
|
||||||
|
@ -2327,6 +2327,23 @@ class TestOvsNeutronAgent(object):
|
|||||||
self._test_ovs_status(constants.OVS_NORMAL,
|
self._test_ovs_status(constants.OVS_NORMAL,
|
||||||
constants.OVS_RESTARTED)
|
constants.OVS_RESTARTED)
|
||||||
|
|
||||||
|
def test_ovs_restart_for_ingress_direct_goto_flows(self):
|
||||||
|
with mock.patch.object(self.agent,
|
||||||
|
'check_ovs_status',
|
||||||
|
return_value=constants.OVS_RESTARTED), \
|
||||||
|
mock.patch.object(self.agent,
|
||||||
|
'_agent_has_updates',
|
||||||
|
side_effect=TypeError('loop exit')), \
|
||||||
|
mock.patch.object(self.agent, 'setup_integration_br'), \
|
||||||
|
mock.patch.object(self.agent,
|
||||||
|
'install_ingress_direct_goto_flows') as \
|
||||||
|
install_ingress_direct_goto_flows:
|
||||||
|
try:
|
||||||
|
self.agent.rpc_loop(polling_manager=mock.Mock())
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
|
install_ingress_direct_goto_flows.assert_called_once_with()
|
||||||
|
|
||||||
def test_rpc_loop_fail_to_process_network_ports_keep_flows(self):
|
def test_rpc_loop_fail_to_process_network_ports_keep_flows(self):
|
||||||
with mock.patch.object(async_process.AsyncProcess, "_spawn"),\
|
with mock.patch.object(async_process.AsyncProcess, "_spawn"),\
|
||||||
mock.patch.object(async_process.AsyncProcess, "start"),\
|
mock.patch.object(async_process.AsyncProcess, "start"),\
|
||||||
|
Loading…
Reference in New Issue
Block a user