Use admin neutron client to query ports for binding
The compute service updates the binding:profile of the neutron port
during server create. If the port has resource_request then the
'allocation' key need to point to the resource provider the port is
allocating resources. Unfortunately this code used a non admin client to
query the port data and therefore if the original server create request
was sent by a non admin user the returned port does not have its
resource_request filled and as a consequence nova does not add the
allocation key to the binding profile.
This patch makes sure that the port is queried with an admin client.
Conflicts: nova/tests/unit/network/test_neutronv2.py
Conflicts due to mox removal patches merged in train. I basically needed
to redo the change in test_neutronv2.py as the merge conflict was huge.
Change-Id: Icc631cf2e81a5c78cb7fb1d0b625d19bd8f5a274
Closes-Bug: #1849657
(cherry picked from commit aab4b7a0e2504c04e08389145bcb1414dea63631)
(cherry picked from commit b6989836dde792dfbde2bbc8b4fe8d4cfb448f47)
Reviewed: https:/ /review. opendev. org/694665 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b1ae940ddb8 23fec6b8e1ab33c 75ef94760f438d
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit b1ae940ddb823fe c6b8e1ab33c75ef 94760f438d
Author: Balazs Gibizer <email address hidden>
Date: Thu Oct 24 17:01:02 2019 +0200
Use admin neutron client to query ports for binding
The compute service updates the binding:profile of the neutron port request filled and as a consequence nova does not add the
during server create. If the port has resource_request then the
'allocation' key need to point to the resource provider the port is
allocating resources. Unfortunately this code used a non admin client to
query the port data and therefore if the original server create request
was sent by a non admin user the returned port does not have its
resource_
allocation key to the binding profile.
This patch makes sure that the port is queried with an admin client.
There is a tempest test change that reproduces the issue: /review. opendev. org/#/c/ 690934
https:/
Conflicts:
nova/ tests/unit/ network/ test_neutronv2. py
Conflicts due to mox removal patches merged in train. I basically needed
to redo the change in test_neutronv2.py as the merge conflict was huge.
Change-Id: Icc631cf2e81a5c 78cb7fb1d0b625d 19bd8f5a274 4e08389145bcb14 14dea63631) fbde2bbc8b4fe8d 4cfb448f47)
Closes-Bug: #1849657
(cherry picked from commit aab4b7a0e2504c0
(cherry picked from commit b6989836dde792d