From 700e6b40160c5464d8391377fcfdbe6259f4bd2e Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Mon, 24 May 2021 14:45:04 +0300 Subject: [PATCH] Drop OVS support We're no longer maintaining the Windows OVS port. Normally, we'd go through the standard deprecation policy but since the Neutron OVS agent no longer runs on Windows at all since Wallaby, we're dropping it right away. Change-Id: I54c681c29c80f1d537e38980f68717b72f6b215b --- compute_hyperv/nova/vif.py | 15 +++--------- compute_hyperv/nova/vmops.py | 1 - compute_hyperv/tests/unit/test_vif.py | 24 +++---------------- doc/source/install/install.rst | 7 ++---- doc/source/install/next-steps.rst | 6 ++--- .../drop-ovs-support-616ec2952580c93d.yaml | 6 +++++ 6 files changed, 16 insertions(+), 43 deletions(-) create mode 100644 releasenotes/notes/drop-ovs-support-616ec2952580c93d.yaml diff --git a/compute_hyperv/nova/vif.py b/compute_hyperv/nova/vif.py index 6714e0ae..e01e494b 100644 --- a/compute_hyperv/nova/vif.py +++ b/compute_hyperv/nova/vif.py @@ -80,18 +80,9 @@ class HyperVVIFDriver(object): if vif_type == model.VIF_TYPE_HYPERV: self._vif_plugin.plug(instance, vif) elif vif_type == model.VIF_TYPE_OVS: - vif = os_vif_util.nova_to_osvif_vif(vif) - instance = os_vif_util.nova_to_osvif_instance(instance) - - # NOTE(claudiub): the vNIC has to be connected to a vSwitch - # before the ovs port is created. - self._netutils.connect_vnic_to_vswitch(CONF.hyperv.vswitch_name, - vif.id) - if CONF.hyperv.enable_instance_metrics_collection: - self._netutils.add_metrics_collection_acls(vif.id) - self.enable_metrics(instance.name, vif.id) - - os_vif.plug(vif, instance) + reason = _("OVS is no longer supported. Please consider using " + "the networking-hyperv agent.") + raise exception.VirtualInterfacePlugException(reason) else: reason = _("Failed to plug virtual interface: " "unexpected vif_type=%s") % vif_type diff --git a/compute_hyperv/nova/vmops.py b/compute_hyperv/nova/vmops.py index a4c01b43..db656234 100644 --- a/compute_hyperv/nova/vmops.py +++ b/compute_hyperv/nova/vmops.py @@ -334,7 +334,6 @@ class VMOps(object): # waiting will occur after the instance is created. self.create_instance(context, instance, network_info, block_device_info, vm_gen, image_meta) - # This is supported starting from OVS version 2.5 self.plug_vifs(instance, network_info) self.update_device_metadata(context, instance) diff --git a/compute_hyperv/tests/unit/test_vif.py b/compute_hyperv/tests/unit/test_vif.py index b5a5573b..b808315a 100644 --- a/compute_hyperv/tests/unit/test_vif.py +++ b/compute_hyperv/tests/unit/test_vif.py @@ -68,28 +68,10 @@ class HyperVVIFDriverTestCase(test_base.HyperVBaseTestCase): def test_plug_ovs(self, mock_nova_to_osvif_vif, mock_nova_to_osvif_instance, mock_enable_metrics, mock_os_vif): - self.flags(enable_instance_metrics_collection=True, - group='hyperv') - vif = {'type': model.VIF_TYPE_OVS} - osvif_instance = mock_nova_to_osvif_instance.return_value - vif_obj = mock_nova_to_osvif_vif.return_value - - self.vif_driver.plug(mock.sentinel.instance, vif) - - mock_nova_to_osvif_vif.assert_called_once_with(vif) - mock_nova_to_osvif_instance.assert_called_once_with( - mock.sentinel.instance) - connect_vnic = self.vif_driver._netutils.connect_vnic_to_vswitch - connect_vnic.assert_called_once_with( - CONF.hyperv.vswitch_name, vif_obj.id) - mock_os_vif.plug.assert_called_once_with( - vif_obj, osvif_instance) - - self._netutils.add_metrics_collection_acls.assert_called_once_with( - vif_obj.id) - mock_enable_metrics.assert_called_once_with( - osvif_instance.name, vif_obj.id) + self.assertRaises(exception.VirtualInterfacePlugException, + self.vif_driver.plug, + mock.sentinel.instance, vif) @ddt.data(True, False) def test_enable_metrics(self, vm_running): diff --git a/doc/source/install/install.rst b/doc/source/install/install.rst index 41a8dc62..97ddc7b5 100644 --- a/doc/source/install/install.rst +++ b/doc/source/install/install.rst @@ -15,13 +15,10 @@ https://cloudbase.it/openstack-hyperv-driver/ The MSI can optionally include the installation and / or configuration of: -* Neutron L2 agents: Neutron Hyper-V Agent, Neutron OVS Agent (if OVS is - installed on the compute node). +* Neutron Hyper-V Agent * Ceilometer Polling Agent. * Windows Services for the mentioned agents. * Live migration feature (if the compute node is joined in an AD). -* OVS vSwitch extension, OVS bridge, OVS tunnel IP (if OVS is installed, and - Neutron OVS Agent is used). * Free RDP * iSCSI Initiator @@ -44,7 +41,7 @@ configurations are: configuration files are installed. By default, they are installed in: ``%ProgramFiles%\Cloudbase Solutions\OpenStack\Nova`` * SKIPNOVACONF: Installs the MSI without doing any of the other actions: - creating configuration files, services, vSwitches, OVS bridges, etc. + creating configuration files, services, vSwitches, etc. Example: diff --git a/doc/source/install/next-steps.rst b/doc/source/install/next-steps.rst index 54fd4d93..0913a332 100644 --- a/doc/source/install/next-steps.rst +++ b/doc/source/install/next-steps.rst @@ -16,8 +16,7 @@ running the following: nova service-list The output should contain the Hyper-V host's ``nova-compute`` service and -Neutron L2 agent (either a Neutron Hyper-V Agent, or a Neutron OVS Agent) as -alive / running. +Neutron L2 agent as alive / running. Starting with Ocata, Nova cells became mandatory. Make sure that the newly added Hyper-V compute node is mapped into a Nova cell, otherwise Nova will not @@ -89,5 +88,4 @@ installed, the Neutron Server service will have to be restarted. Additionally, keep in mind that the Neutron Hyper-V Agent only supports the following network types: local, flat, VLAN. Ports with any other network -type will result in a PortBindingFailure exception. If tunneling is desired, -the Neutron OVS Agent should be used instead. +type will result in a PortBindingFailure exception. diff --git a/releasenotes/notes/drop-ovs-support-616ec2952580c93d.yaml b/releasenotes/notes/drop-ovs-support-616ec2952580c93d.yaml new file mode 100644 index 00000000..a27ff72b --- /dev/null +++ b/releasenotes/notes/drop-ovs-support-616ec2952580c93d.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + Windows OVS support is no longer maintained. The Neutron OVS agent no longer + starts on Windows either since Wallaby. Please consider using the + networking-hyperv Neutron ML2 agent instead.