From a81f5443478893bfc4211f56f42005fe85c2bba6 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Wed, 10 Jun 2020 12:50:25 -0400 Subject: [PATCH] Allow VXLAN network type for OVN driver Since 20.09, OVN supports VXLAN type for inter-chassis communication. Change-Id: I81c016ba9c91282d1bebb40a282077e14ce4bd6b --- doc/source/ovn/faq/index.rst | 10 ++++++++++ .../plugins/ml2/drivers/ovn/mech_driver/mech_driver.py | 1 + .../ml2/drivers/ovn/mech_driver/test_mech_driver.py | 10 ++++++---- .../notes/vxlan-ovn-support-89f71332fa41952c.yaml | 5 +++++ 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/vxlan-ovn-support-89f71332fa41952c.yaml diff --git a/doc/source/ovn/faq/index.rst b/doc/source/ovn/faq/index.rst index c00946343ff..2f1ec337adc 100644 --- a/doc/source/ovn/faq/index.rst +++ b/doc/source/ovn/faq/index.rst @@ -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 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. diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py index e94d03358fe..0da02ebe9f4 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py @@ -406,6 +406,7 @@ class OVNMechanismDriver(api.MechanismDriver): return (network_type in [const.TYPE_LOCAL, const.TYPE_FLAT, const.TYPE_GENEVE, + const.TYPE_VXLAN, const.TYPE_VLAN]) def _validate_network_segments(self, network_segments): diff --git a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py index 793b65ad59a..0d005d68a7e 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py +++ b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py @@ -649,24 +649,26 @@ class TestOVNMechanismDriver(test_plugin.Ml2PluginV2TestCase): # Test supported network types. fake_network_context = self._create_fake_network_context('local') self.mech_driver.create_network_precommit(fake_network_context) + fake_network_context = self._create_fake_network_context( 'flat', physical_network='physnet') self.mech_driver.update_network_precommit(fake_network_context) + fake_network_context = self._create_fake_network_context( 'geneve', segmentation_id=10) self.mech_driver.create_network_precommit(fake_network_context) + fake_network_context = self._create_fake_network_context( 'vlan', physical_network='physnet', segmentation_id=11) self.mech_driver.update_network_precommit(fake_network_context) fake_mp_network_context = self._create_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( '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( 'gre', segmentation_id=13) self.assertRaises(n_exc.InvalidInput, diff --git a/releasenotes/notes/vxlan-ovn-support-89f71332fa41952c.yaml b/releasenotes/notes/vxlan-ovn-support-89f71332fa41952c.yaml new file mode 100644 index 00000000000..a7a10c9838b --- /dev/null +++ b/releasenotes/notes/vxlan-ovn-support-89f71332fa41952c.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + OVN driver now supports VXLAN type for networks. This requires + OVN version to be 20.09 or newer.