From 587c3de89bc2750a8297e5609b0ea9a39e876cc4 Mon Sep 17 00:00:00 2001 From: Jan Gutter Date: Thu, 20 Jul 2017 19:28:15 +0200 Subject: [PATCH] Add support for virtio-forwarder VNIC type * This patch adds support for the virtio-forwarder VNIC type. * The virtio-forwarder VNIC type has been added as another option for setting the "binding:vnic_type" property on a port. This requests a low-latency virtio port inside the instance, likely backed by hardware acceleration. * The documentation for OPENSTACK_NEUTRON_NETWORK/supported_vnic_types has been updated to clarify the term "supported VNIC types". Unfortunately, the VNIC binding happens at scheduling and error reporting in core Nova and Neutron is not optimal in this case. * Corresponding python-openstackclient change: https://review.openstack.org/#/c/483532/ * Corresponding neutron-lib change: https://review.openstack.org/#/c/483530/ Signed-off-by: Jan Gutter Closes-Bug: 1705548 Depends-On: I28315fb12f62dc7d52d099c211086b2b81eca39a Change-Id: I02dc3581de8f31c659e545e340cbdf6a1b2bb837 --- doc/source/configuration/settings.rst | 19 +++++++++++++++---- .../dashboards/admin/networks/ports/forms.py | 3 ++- .../project/networks/ports/forms.py | 3 ++- .../networkports/ports.controller.js | 3 ++- .../local/local_settings.py.example | 4 ++-- ...-forwarder-vnic-type-03eba218d36e2aae.yaml | 9 +++++++++ 6 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/add-virtio-forwarder-vnic-type-03eba218d36e2aae.yaml diff --git a/doc/source/configuration/settings.rst b/doc/source/configuration/settings.rst index 4fb6185d88..a8acc5a0aa 100644 --- a/doc/source/configuration/settings.rst +++ b/doc/source/configuration/settings.rst @@ -1757,13 +1757,24 @@ supported_vnic_types .. versionadded:: 2015.1(Kilo) +.. versionchanged:: 12.0.0(Pike) + + Added ``virtio-forwarder`` VNIC type + Clarified VNIC type availability for users and operators + + Default ``['*']`` For use with the port binding extension. Use this to explicitly set which VNIC -types are supported; only those listed will be shown when creating or editing -a port. VNIC types include ``normal``, ``direct``, ``direct-physical``, -``macvtap`` and ``baremetal``. By default all VNIC types will be available to -choose from. +types are available for users to choose from, when creating or editing a port. +The VNIC types actually supported are determined by resource availability and +Neutron ML2 plugin support. +Currently, error reporting for users selecting an incompatible or unavailable +VNIC type is restricted to receiving a message from the scheduler that the +instance cannot spawn because of insufficient resources. +VNIC types include ``normal``, ``direct``, ``direct-physical``, ``macvtap``, +``baremetal`` and ``virtio-forwarder``. By default all VNIC types will be +available to choose from. Example: ``['normal', 'direct']`` diff --git a/openstack_dashboard/dashboards/admin/networks/ports/forms.py b/openstack_dashboard/dashboards/admin/networks/ports/forms.py index e3c29d9ac1..f852cc625b 100644 --- a/openstack_dashboard/dashboards/admin/networks/ports/forms.py +++ b/openstack_dashboard/dashboards/admin/networks/ports/forms.py @@ -32,7 +32,8 @@ VNIC_TYPES = [('normal', _('Normal')), ('direct', _('Direct')), ('direct-physical', _('Direct Physical')), ('macvtap', _('MacVTap')), - ('baremetal', _('Bare Metal'))] + ('baremetal', _('Bare Metal')), + ('virtio-forwarder', _('Virtio Forwarder'))] class CreatePort(project_forms.CreatePort): diff --git a/openstack_dashboard/dashboards/project/networks/ports/forms.py b/openstack_dashboard/dashboards/project/networks/ports/forms.py index 62dd9c4a0d..e0ab20fde3 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/forms.py +++ b/openstack_dashboard/dashboards/project/networks/ports/forms.py @@ -30,7 +30,8 @@ VNIC_TYPES = [('normal', _('Normal')), ('direct', _('Direct')), ('direct-physical', _('Direct Physical')), ('macvtap', _('MacVTap')), - ('baremetal', _('Bare Metal'))] + ('baremetal', _('Bare Metal')), + ('virtio-forwarder', _('Virtio Forwarder'))] class CreatePort(forms.SelfHandlingForm): diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/networkports/ports.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/networkports/ports.controller.js index 9b527ea677..1a4cc4dd0e 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/networkports/ports.controller.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/networkports/ports.controller.js @@ -49,7 +49,8 @@ 'direct': gettext('Direct'), 'direct-physical': gettext('Direct Physical'), 'macvtap': gettext('MacVTap'), - 'baremetal': gettext('Bare Metal') + 'baremetal': gettext('Bare Metal'), + 'virtio-forwarder': gettext('Virtio Forwarder') }; ctrl.tableDataMulti = { diff --git a/openstack_dashboard/local/local_settings.py.example b/openstack_dashboard/local/local_settings.py.example index 6b359eebc4..86b6e04842 100644 --- a/openstack_dashboard/local/local_settings.py.example +++ b/openstack_dashboard/local/local_settings.py.example @@ -350,8 +350,8 @@ OPENSTACK_NEUTRON_NETWORK = { # Set which VNIC types are supported for port binding. Only the VNIC # types in this list will be available to choose from when creating a # port. - # VNIC types include 'normal', 'direct', 'direct-physical', 'macvtap' and - # 'baremetal' + # VNIC types include 'normal', 'direct', 'direct-physical', 'macvtap', + # 'baremetal' and 'virtio-forwarder' # Set to empty list or None to disable VNIC type selection. 'supported_vnic_types': ['*'], diff --git a/releasenotes/notes/add-virtio-forwarder-vnic-type-03eba218d36e2aae.yaml b/releasenotes/notes/add-virtio-forwarder-vnic-type-03eba218d36e2aae.yaml new file mode 100644 index 0000000000..21360e37c3 --- /dev/null +++ b/releasenotes/notes/add-virtio-forwarder-vnic-type-03eba218d36e2aae.yaml @@ -0,0 +1,9 @@ +--- +features: + - The ``virtio-forwarder`` VNIC type has been added to the list of valid + types that may be set on a port. This requests a low-latency virtio port + inside the instance, likely backed by hardware acceleration and requires a + supporting Neutron mechanism driver. + - The configuration documentation for ``supported_vnic_types`` in + ``OPENSTACK_NEUTRON_NETWORK`` has been updated to help an operator decide + which VNIC types should be available for users to choose from.