Reviewed: https://review.opendev.org/691005 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=38a214466fa2cccc3808ca6d7d7140cf56f733ba Submitter: Zuul Branch: master
commit 38a214466fa2cccc3808ca6d7d7140cf56f733ba Author: Balazs Gibizer <balazs.gibi...@est.tech> Date: Thu Oct 24 17:31:45 2019 +0200 Use admin neutron client to gather port resource requests The network_api get_requested_resource_for_instance() creates a neutron client with the current request context and uses the client to query neutron ports. Neutron does not return the resource_request of the neutron port if it is queried by a non-admin. So if the request context was a non admin context nova thought that none of the ports have resource requests. This patch ensures that an admin client is used to query the ports. Change-Id: I1178fb77a74010c3b9f51eea22c7e7576b600015 Closes-Bug: #1849695 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1849695 Title: resize of server with qos ports fails if called by non admin user Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) train series: Triaged Bug description: As a non admin: * Create a server with a qos port. * Resize the server to another flavor. => Server goes to ERROR state and the following is logged in the nova- compute log on the destination host Oct 24 14:33:42 aio nova-compute[10293]: ERROR oslo_messaging.rpc.server PortUpdateFailed: Port update failed for port b1593c18-b088-4d5c-b3c6-bdd5348f3b52: Provider mappings are not available to the compute service but are required for ports with a resource request. Triage: Similarly to bug 1849657 Nova uses a non admin Neutron client to query the ports[1] at the start of the resize. The the resize operation is not called by an admin user then the resource_request field of the Neutron is not filled. This causes that Nova does allocate resources and does not create port - rp mapping for the qos ports on the destination node. But when the qos port is being updated on the destination host [2] nova uses an admin client and therefore sees the resource_request of the qos ports. As the port - rp mapping is missing for these ports the resize fails. [1] https://github.com/openstack/nova/blob/1bfa4626d13d0a73e63745cc4a864ae86d490daf/nova/network/neutronv2/api.py#L2228 [2] https://github.com/openstack/nova/blob/1bfa4626d13d0a73e63745cc4a864ae86d490daf/nova/network/neutronv2/api.py#L3305 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1849695/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp