diff --git a/nova/conf/xenserver.py b/nova/conf/xenserver.py index 6bb85e7f5f62..8b6f310def1c 100644 --- a/nova/conf/xenserver.py +++ b/nova/conf/xenserver.py @@ -547,12 +547,21 @@ time, the launch expires and the instance(s) are set to 'error' state. """), cfg.StrOpt('vif_driver', - default='nova.virt.xenapi.vif.XenAPIBridgeDriver', + default='nova.virt.xenapi.vif.XenAPIOpenVswitchDriver', + deprecated_for_removal=True, + deprecated_since='15.0.0', + deprecated_reason=""" +There are only two in-tree vif drivers for XenServer. XenAPIBridgeDriver is for +nova-network which is deprecated and XenAPIOpenVswitchDriver is for Neutron +which is the default configuration for Nova since the 15.0.0 Ocata release. In +the future the "use_neutron" configuration option will be used to determine +which vif driver to use. +""", help=""" The XenAPI VIF driver using XenServer Network APIs. -Provide a string value representing the VIF XenAPI bridge driver to -use for bridging. +Provide a string value representing the VIF XenAPI vif driver to use for +plugging virtual network interfaces. Xen configuration uses bridging within the backend domain to allow all VMs to appear on the network as individual hosts. Bridge @@ -561,9 +570,15 @@ the VIFs for the VM instances are plugged. If no VIF bridge driver is plugged, the bridge is not made available. This configuration option takes in a value for the VIF driver. -NOTE: -The XenAPIBridgeDriver should be used for running OVS or Bridge in -XenServer. +Possible values: + +* nova.virt.xenapi.vif.XenAPIOpenVswitchDriver (default) +* nova.virt.xenapi.vif.XenAPIBridgeDriver (deprecated) + +Related options: + +* ``vlan_interface`` +* ``ovs_integration_bridge`` """), # TODO(dharinic): Make this, a stevedore plugin cfg.StrOpt('image_upload_handler', diff --git a/nova/tests/unit/virt/xenapi/stubs.py b/nova/tests/unit/virt/xenapi/stubs.py index c024bc82fdb3..5150330af1a6 100644 --- a/nova/tests/unit/virt/xenapi/stubs.py +++ b/nova/tests/unit/virt/xenapi/stubs.py @@ -397,6 +397,10 @@ def get_fake_session(error=None): class XenAPITestBase(test.TestCase): def setUp(self): super(XenAPITestBase, self).setUp() + # TODO(mriedem): The tests need to be fixed to work with the + # XenAPIOpenVswitchDriver vif driver. + self.flags(vif_driver='nova.virt.xenapi.vif.XenAPIBridgeDriver', + group='xenserver') self.useFixture(ReplaceModule('XenAPI', fake)) fake.reset() @@ -404,5 +408,9 @@ class XenAPITestBase(test.TestCase): class XenAPITestBaseNoDB(test.NoDBTestCase): def setUp(self): super(XenAPITestBaseNoDB, self).setUp() + # TODO(mriedem): The tests need to be fixed to work with the + # XenAPIOpenVswitchDriver vif driver. + self.flags(vif_driver='nova.virt.xenapi.vif.XenAPIBridgeDriver', + group='xenserver') self.useFixture(ReplaceModule('XenAPI', fake)) fake.reset() diff --git a/releasenotes/notes/deprecate-xenserver-vif-driver-option-12eb279c0c93c157.yaml b/releasenotes/notes/deprecate-xenserver-vif-driver-option-12eb279c0c93c157.yaml new file mode 100644 index 000000000000..93f8f660c8df --- /dev/null +++ b/releasenotes/notes/deprecate-xenserver-vif-driver-option-12eb279c0c93c157.yaml @@ -0,0 +1,13 @@ +--- +upgrade: + - | + The default value for the ``[xenserver]/vif_driver`` configuration option + has been changed to ``nova.virt.xenapi.vif.XenAPIOpenVswitchDriver`` to + match the default configuration of ``[DEFAULT]/use_neutron=True``. +deprecations: + - | + The ``[xenserver]/vif_driver`` configuration option is deprecated for + removal. The ``XenAPIOpenVswitchDriver`` vif driver is used for Neutron and + the ``XenAPIBridgeDriver`` vif driver is used for nova-network, which + itself is deprecated. In the future, the ``use_neutron`` configuration + option will be used to determine which vif driver to load.