diff options
author | Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com> | 2022-01-16 23:27:38 +0300 |
---|---|---|
committer | Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com> | 2022-02-09 01:23:27 +0300 |
commit | 0620678344d0f032a33e952d4d0fa653741f09e7 (patch) | |
tree | ad9bdef05db15a01fc87f352e753660765f9009c /nova/api/openstack/compute | |
parent | c487c730d010013f8579622337af63d93b733f3b (diff) | |
download | nova-0620678344d0f032a33e952d4d0fa653741f09e7.tar.gz |
[yoga] Add support for VNIC_REMOTE_MANAGED
Allow instances to be created with VNIC_TYPE_REMOTE_MANAGED ports.
Those ports are assumed to require remote-managed PCI devices which
means that operators need to tag those as "remote_managed" in the PCI
whitelist if this is the case (there is no meta information or standard
means of querying this information).
The following changes are introduced:
* Handling for VNIC_TYPE_REMOTE_MANAGED ports during allocation of
resources for instance creation (remote_managed == true in
InstancePciRequests);
* Usage of the noop os-vif plugin for VNIC_TYPE_REMOTE_MANAGED ports
in order to avoid the invocation of the local representor plugging
logic since a networking backend is responsible for that in this
case;
* Expectation of bind time events for ports of VNIC_TYPE_REMOTE_MANAGED.
Events for those arrive early from Neutron after a port update (before
Nova begins to wait in the virt driver code, therefore, Nova is set
to avoid waiting for plug events for VNIC_TYPE_REMOTE_MANAGED ports;
* Making sure the service version is high enough on all compute services
before creating instances with ports that have VNIC type
VNIC_TYPE_REMOTE_MANAGED. Network requests are examined for the presence
of port ids to determine the VNIC type via Neutron API. If
remote-managed ports are requested, a compute service version check
is performed across all cells.
Change-Id: Ica09376951d49bc60ce6e33147477e4fa38b9482
Implements: blueprint integration-with-off-path-network-backends
Diffstat (limited to 'nova/api/openstack/compute')
-rw-r--r-- | nova/api/openstack/compute/attach_interfaces.py | 1 | ||||
-rw-r--r-- | nova/api/openstack/compute/servers.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/attach_interfaces.py b/nova/api/openstack/compute/attach_interfaces.py index 6a24a60959..34edf30cb6 100644 --- a/nova/api/openstack/compute/attach_interfaces.py +++ b/nova/api/openstack/compute/attach_interfaces.py @@ -178,6 +178,7 @@ class InterfaceAttachmentController(wsgi.Controller): exception.InterfaceAttachPciClaimFailed, exception.InterfaceAttachResourceAllocationFailed, exception.ForbiddenPortsWithAccelerator, + exception.ForbiddenWithRemoteManagedPorts, exception.ExtendedResourceRequestOldCompute, ) as e: raise exc.HTTPBadRequest(explanation=e.format_message()) diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 1d6d29b45f..1bfb3db698 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -862,6 +862,7 @@ class ServersController(wsgi.Controller): exception.DeviceProfileError, exception.ComputeHostNotFound, exception.ForbiddenPortsWithAccelerator, + exception.ForbiddenWithRemoteManagedPorts, exception.ExtendedResourceRequestOldCompute, ) as error: raise exc.HTTPBadRequest(explanation=error.format_message()) |