Don't delete br-int to br-tun patch on startup
When starting up, we don't want to delete the patch port between br-int
and br-tun unless we're also dropping the flows.. In liberty both of
these bridges were switched to not dump flows on startup and to put the
bridges in secure mode so that default flood flows are not installed
when the bridge is created.
Without this patch the patch port is torn down and not reinstalled until
br-tun is setup again.
Partial-Bug: #1514056
Change-Id: Ia518a99a2de5d1bda467fde57892c43970f88bcd
(cherry picked from commit 8dce6a5c87
)
This commit is contained in:
parent
fc69097448
commit
93d29d131c
|
@ -983,8 +983,11 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
|
|||
self.int_br.set_secure_mode()
|
||||
self.int_br.setup_controllers(self.conf)
|
||||
|
||||
self.int_br.delete_port(self.conf.OVS.int_peer_patch_port)
|
||||
if self.conf.AGENT.drop_flows_on_start:
|
||||
# Delete the patch port between br-int and br-tun if we're deleting
|
||||
# the flows on br-int, so that traffic doesn't get flooded over
|
||||
# while flows are missing.
|
||||
self.int_br.delete_port(self.conf.OVS.int_peer_patch_port)
|
||||
self.int_br.delete_flows()
|
||||
self.int_br.setup_default_table()
|
||||
|
||||
|
|
|
@ -180,6 +180,17 @@ class TestOVSAgent(base.OVSAgentTestFramework):
|
|||
self.agent.setup_integration_br()
|
||||
time.sleep(0.25)
|
||||
|
||||
def test_assert_patch_port_ofports_dont_change(self):
|
||||
# When the integration bridge is setup, it should reuse the existing
|
||||
# patch ports between br-int and br-tun.
|
||||
self.setup_agent_and_ports(port_dicts=[], create_tunnels=True)
|
||||
patch_int_ofport_before = self.agent.patch_int_ofport
|
||||
patch_tun_ofport_before = self.agent.patch_tun_ofport
|
||||
|
||||
self.setup_agent_and_ports(port_dicts=[], create_tunnels=True)
|
||||
self.assertEqual(patch_int_ofport_before, self.agent.patch_int_ofport)
|
||||
self.assertEqual(patch_tun_ofport_before, self.agent.patch_tun_ofport)
|
||||
|
||||
def test_noresync_after_port_gone(self):
|
||||
'''This will test the scenario where a port is removed after listing
|
||||
it but before getting vif info about it.
|
||||
|
|
|
@ -182,7 +182,6 @@ class TunnelTest(object):
|
|||
mock.call.create(),
|
||||
mock.call.set_secure_mode(),
|
||||
mock.call.setup_controllers(mock.ANY),
|
||||
mock.call.delete_port('patch-tun'),
|
||||
mock.call.setup_default_table(),
|
||||
]
|
||||
|
||||
|
@ -628,7 +627,6 @@ class TunnelTestUseVethInterco(TunnelTest):
|
|||
mock.call.create(),
|
||||
mock.call.set_secure_mode(),
|
||||
mock.call.setup_controllers(mock.ANY),
|
||||
mock.call.delete_port('patch-tun'),
|
||||
mock.call.setup_default_table(),
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue