Use admin neutron client to see if instance has qos ports
The nova-api checks at each move* operation if the instance has qos port
attached as not all the move operations are supported for such servers.
Nova uses the request context to initialize the neutron client for the
port query. However neutron does not return the value of the
resource_request of the port if it is queried with a non admin client.
This causes that if the move operation is initiated by a non admin
then nova thinks that the ports do not have resource request.
This patch creates an admin context for this neutron query.
The new functional tests are not added before this patch in a regression
test like way as existing functional tests are reused with different
setup and doing that without the fix causes a lot of different failure
scenarios.
Note that neutron fixture is changed to simulate the different behavior
in case of different request context are used to initialize the client.
*: Note that Id5f2f4f22b856c989e2eef8ed56b9829d1bcefb6 removed the check
for evacuate in Ussuri but exists in Train and Stein.
Conflicts: nova/tests/fixtures.py
Due to d2d4317e1a31f6ac40c5f29b57cd4ea196dc8780 is missing from
stable/train
Another difference from the original patch is in
nova/api/openstack/compute/evacuate.py due to
Id5f2f4f22b856c989e2eef8ed56b9829d1bcefb6 is only merged in Ussuri.
Change-Id: I3cf6eb4654663865d9258c38f05cd05974ffcf9d
Closes-Bug: #1850280
(cherry picked from commit 899976960503524b8e5c6588e339742ca4bf8158)
Reviewed: https:/ /review. opendev. org/694018 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4cb493fe4f7 9e736ae4fd7874b 02d1d5ceed02c1
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 4cb493fe4f79e73 6ae4fd7874b02d1 d5ceed02c1
Author: Balazs Gibizer <email address hidden>
Date: Tue Oct 29 16:43:04 2019 +0100
Use admin neutron client to see if instance has qos ports
The nova-api checks at each move* operation if the instance has qos port request of the port if it is queried with a non admin client.
attached as not all the move operations are supported for such servers.
Nova uses the request context to initialize the neutron client for the
port query. However neutron does not return the value of the
resource_
This causes that if the move operation is initiated by a non admin
then nova thinks that the ports do not have resource request.
This patch creates an admin context for this neutron query.
The new functional tests are not added before this patch in a regression
test like way as existing functional tests are reused with different
setup and doing that without the fix causes a lot of different failure
scenarios.
Note that neutron fixture is changed to simulate the different behavior
in case of different request context are used to initialize the client.
*: Note that Id5f2f4f22b856c 989e2eef8ed56b9 829d1bcefb6 removed the check
for evacuate in Ussuri but exists in Train and Stein.
Conflicts:
nova/ tests/fixtures. py c40c5f29b57cd4e a196dc8780 is missing from
Due to d2d4317e1a31f6a
stable/train
Another difference from the original patch is in api/openstack/ compute/ evacuate. py due to 856c989e2eef8ed 56b9829d1bcefb6 is only merged in Ussuri.
nova/
Id5f2f4f22b
Change-Id: I3cf6eb46546638 65d9258c38f05cd 05974ffcf9d b8e5c6588e33974 2ca4bf8158)
Closes-Bug: #1850280
(cherry picked from commit 899976960503524