Allow VXLAN network type for OVN driver

Since 20.09, OVN supports VXLAN type for inter-chassis communication.

Change-Id: I81c016ba9c91282d1bebb40a282077e14ce4bd6b
This commit is contained in:
Ihar Hrachyshka 2020-06-10 12:50:25 -04:00
parent 0fdcc4b1b6
commit a81f544347
4 changed files with 22 additions and 4 deletions

View File

@ -108,4 +108,14 @@ address. When the HA manager detects a failure of the master, the
virtual IP would be moved and the passive replica would become the virtual IP would be moved and the passive replica would become the
new master. new master.
**Q: Which core OVN version should I use for my OpenStack installation?**
OpenStack doesn't set explicit version requirements for OVN installation, but
it's recommended to follow at least the version that is used in upstream CI,
e.g.:
https://github.com/openstack/neutron/blob/4d31284373e89cb2b29539d6718f90a4c4d8284b/zuul.d/tempest-singlenode.yaml#L310
Some new features may require the latest core OVN version to work. For example,
to be able to use VXLAN network type, one must run OVN 20.09+.
See :doc:`/admin/ovn/ovn` for links to more details on OVN's architecture. See :doc:`/admin/ovn/ovn` for links to more details on OVN's architecture.

View File

@ -406,6 +406,7 @@ class OVNMechanismDriver(api.MechanismDriver):
return (network_type in [const.TYPE_LOCAL, return (network_type in [const.TYPE_LOCAL,
const.TYPE_FLAT, const.TYPE_FLAT,
const.TYPE_GENEVE, const.TYPE_GENEVE,
const.TYPE_VXLAN,
const.TYPE_VLAN]) const.TYPE_VLAN])
def _validate_network_segments(self, network_segments): def _validate_network_segments(self, network_segments):

View File

@ -649,24 +649,26 @@ class TestOVNMechanismDriver(test_plugin.Ml2PluginV2TestCase):
# Test supported network types. # Test supported network types.
fake_network_context = self._create_fake_network_context('local') fake_network_context = self._create_fake_network_context('local')
self.mech_driver.create_network_precommit(fake_network_context) self.mech_driver.create_network_precommit(fake_network_context)
fake_network_context = self._create_fake_network_context( fake_network_context = self._create_fake_network_context(
'flat', physical_network='physnet') 'flat', physical_network='physnet')
self.mech_driver.update_network_precommit(fake_network_context) self.mech_driver.update_network_precommit(fake_network_context)
fake_network_context = self._create_fake_network_context( fake_network_context = self._create_fake_network_context(
'geneve', segmentation_id=10) 'geneve', segmentation_id=10)
self.mech_driver.create_network_precommit(fake_network_context) self.mech_driver.create_network_precommit(fake_network_context)
fake_network_context = self._create_fake_network_context( fake_network_context = self._create_fake_network_context(
'vlan', physical_network='physnet', segmentation_id=11) 'vlan', physical_network='physnet', segmentation_id=11)
self.mech_driver.update_network_precommit(fake_network_context) self.mech_driver.update_network_precommit(fake_network_context)
fake_mp_network_context = self._create_fake_mp_network_context() fake_mp_network_context = self._create_fake_mp_network_context()
self.mech_driver.create_network_precommit(fake_mp_network_context) self.mech_driver.create_network_precommit(fake_mp_network_context)
# Test unsupported network types.
fake_network_context = self._create_fake_network_context( fake_network_context = self._create_fake_network_context(
'vxlan', segmentation_id=12) 'vxlan', segmentation_id=12)
self.assertRaises(n_exc.InvalidInput, self.mech_driver.create_network_precommit(fake_network_context)
self.mech_driver.create_network_precommit,
fake_network_context) # Test unsupported network types.
fake_network_context = self._create_fake_network_context( fake_network_context = self._create_fake_network_context(
'gre', segmentation_id=13) 'gre', segmentation_id=13)
self.assertRaises(n_exc.InvalidInput, self.assertRaises(n_exc.InvalidInput,

View File

@ -0,0 +1,5 @@
---
features:
- |
OVN driver now supports VXLAN type for networks. This requires
OVN version to be 20.09 or newer.