Force "out-of-band" controller connection mode
By default openvswitch uses "in-band" controller connection mode ([1]) which adds hidden OpenFlow rules (only visible by issuing ovs-appctl bridge/dump-flows <br>) and leads to a network loop on br-tun when using native OpenFlow interface. As of now the OF controller is hosted locally with OVS which fits the "out-of-band" mode. If the remote OF controller is ever to be supported by openvswitch agent in the future, "In-Band Control" [1] should be taken into consideration for physical bridge only, but br-int and br-tun must be configured with the "out-of-band" controller connection mode. [1] https://github.com/openvswitch/ovs/blob/master/DESIGN.md Change-Id: I792a89d37b5d5319cc027835f6a1bfcbe7297ffb Closes-Bug: #1588393
This commit is contained in:
parent
88710bbc6b
commit
09ff5e5ebd
@ -80,5 +80,21 @@ class OVSAgentBridge(ofswitch.OpenFlowSwitchMixin,
|
||||
self.set_protocols(ovs_consts.OPENFLOW13)
|
||||
self.set_controller(controllers)
|
||||
|
||||
# NOTE(ivc): Force "out-of-band" controller connection mode (see
|
||||
# "In-Band Control" [1]).
|
||||
#
|
||||
# By default openvswitch uses "in-band" controller connection mode
|
||||
# which adds hidden OpenFlow rules (only visible by issuing ovs-appctl
|
||||
# bridge/dump-flows <br>) and leads to a network loop on br-tun. As of
|
||||
# now the OF controller is hosted locally with OVS which fits the
|
||||
# "out-of-band" mode. If the remote OF controller is ever to be
|
||||
# supported by openvswitch agent in the future, "In-Band Control" [1]
|
||||
# should be taken into consideration for physical bridge only, but
|
||||
# br-int and br-tun must be configured with the "out-of-band"
|
||||
# controller connection mode.
|
||||
#
|
||||
# [1] https://github.com/openvswitch/ovs/blob/master/DESIGN.md
|
||||
self.set_controllers_connection_mode("out-of-band")
|
||||
|
||||
def drop_port(self, in_port):
|
||||
self.install_drop(priority=2, in_port=in_port)
|
||||
|
@ -130,6 +130,20 @@ class OVSBridgeTestBase(ovs_test_base.OVSRyuTestBase):
|
||||
self.assertEqual('192.168.0.1', f('192.168.0.1/32'))
|
||||
self.assertEqual(('192.168.0.0', '255.255.255.0'), f('192.168.0.0/24'))
|
||||
|
||||
def test__setup_controllers__out_of_band(self):
|
||||
cfg = mock.MagicMock()
|
||||
cfg.OVS.of_listen_address = ""
|
||||
cfg.OVS.of_listen_port = ""
|
||||
|
||||
m_set_protocols = mock.patch.object(self.br, 'set_protocols')
|
||||
m_set_controller = mock.patch.object(self.br, 'set_controller')
|
||||
m_set_ccm = mock.patch.object(self.br,
|
||||
'set_controllers_connection_mode')
|
||||
|
||||
with m_set_ccm as set_ccm, m_set_controller, m_set_protocols:
|
||||
self.br.setup_controllers(cfg)
|
||||
set_ccm.assert_called_once_with("out-of-band")
|
||||
|
||||
|
||||
class OVSDVRProcessTestMixin(object):
|
||||
def test_install_dvr_process_ipv4(self):
|
||||
|
Loading…
Reference in New Issue
Block a user