Deprecate linux bridge usage in data-port config

f832f1073d addressed LP: #1635067 by
adding support for using pre-created Linux bridges in the data-port
config option.

The same use-case of reusing a single physical interface for VLAN
interfaces and plugging it into an OVS bridge can be addressed in a
different way by plugging the physical interface directly into the OVS
bridge and creating VLAN interfaces on that physical interface - this
does not require the use of veth pairs which is problematic due to the
performance reasons and lack of support for in netplan for veth pairs at
the time of writing.

There is a procedure to move from the setup with Linux bridge and veth
pair used to the one that does not which will be documented to migrate
the existing environments in-place.

Partial-Bug: #1877594
Change-Id: I5e455fa701cc2f5248ccfd9ed15f3c902aacb1ef
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
This commit is contained in:
Dmitrii Shcherbakov 2020-05-14 17:54:55 +03:00 committed by Aurelien Lourot
parent 6ad570051c
commit 0cbc2a8c0f
2 changed files with 20 additions and 1 deletions

View File

@ -700,6 +700,10 @@ def configure_ovs():
ifdata=generate_external_ids(br),
portdata=generate_external_ids(br))
else:
log('{} is a Linux bridge: using Linux bridges in the '
'data-port config is deprecated for removal after '
'21.10 release of OpenStack charms.'.format(port),
level=WARNING)
add_ovsbridge_linuxbridge(
br, port, ifdata=generate_external_ids(br),
portdata=generate_external_ids(br))

View File

@ -70,6 +70,7 @@ TO_PATCH = [
'is_container',
'is_unit_paused_set',
'deferrable_svc_restart',
'log',
]
head_pkg = 'linux-headers-3.15.0-5-generic'
@ -660,8 +661,22 @@ class TestNeutronOVSUtils(CharmTestCase):
_nics.return_value = ['br-juju']
self.add_bridge.reset_mock()
self.add_bridge_port.reset_mock()
expected_ifdata = {
'external-ids': {
'charm-neutron-openvswitch': 'br-foo'
}
}
nutils.configure_ovs()
self.assertTrue(self.add_ovsbridge_linuxbridge.called)
self.add_ovsbridge_linuxbridge.assert_called_once_with(
'br-foo',
'br-juju',
ifdata=expected_ifdata,
portdata=expected_ifdata,
)
self.log.assert_called_with(
'br-juju is a Linux bridge: using Linux bridges in the data-port '
'config is deprecated for removal after 21.10 release of OpenStack'
' charms.', level='WARNING')
@patch.object(nutils, 'use_dvr')
@patch('charmhelpers.contrib.network.ovs.charm_name')