Bug 1982485 - [OSP16.2] nova-manage placement audit can't look up the target resource provider if --resource_provider is specified
Summary: [OSP16.2] nova-manage placement audit can't look up the target resource provi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z3
: 16.2 (Train on RHEL 8.4)
Assignee: Takashi Kajinami
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks: 2068379
TreeView+ depends on / blocked
 
Reported: 2021-07-15 02:17 UTC by Takashi Kajinami
Modified: 2023-03-21 19:46 UTC (History)
10 users (show)

Fixed In Version: openstack-nova-20.6.2-2.20220406160113.a5da31e.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2068379 (view as bug list)
Environment:
Last Closed: 2022-06-22 16:02:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1936278 0 None None None 2021-07-15 02:29:40 UTC
OpenStack gerrit 800855 0 None MERGED Fix request path to query a resource provider by uuid 2022-03-24 15:59:49 UTC
Red Hat Issue Tracker OSP-6251 0 None None None 2021-11-15 13:08:00 UTC
Red Hat Product Errata RHBA-2022:4793 0 None None None 2022-06-22 16:03:08 UTC

Description Takashi Kajinami 2021-07-15 02:17:34 UTC
Description of problem:

Currently nova-manage placement audit command always fails with the following error
 Resource provider with UUID <id> does not exist.

(example)
~~~
[heat-admin@controller-0 ~]$ sudo podman exec -it nova_api nova-manage placement audit --resource_provider dbba1bf7-6e97-4dcb-8d4c-37fe36633358 --verbose
Resource provider with UUID dbba1bf7-6e97-4dcb-8d4c-37fe36633358 does not exist.
Error: non zero exit code: 127: OCI runtime error
~~~

However the target resource provider record actually exists in placement.

~~~
(overcloud) [stack@undercloud-0 ~]$ openstack resource provider list --uuid dbba1bf7-6e97-4dcb-8d4c-37fe36633358 --os-placement-api-version 1.14
+--------------------------------------+------------------------+------------+--------------------------------------+----------------------+
| uuid                                 | name                   | generation | root_provider_uuid                   | parent_provider_uuid |
+--------------------------------------+------------------------+------------+--------------------------------------+----------------------+
| dbba1bf7-6e97-4dcb-8d4c-37fe36633358 | compute-0.redhat.local |         28 | dbba1bf7-6e97-4dcb-8d4c-37fe36633358 | None                 |
+--------------------------------------+------------------------+------------+--------------------------------------+----------------------+
~~~

Looking at access log in placement service, I noticed that the command
is sending a request to /placment/resource_provider&uuid=<id> .

~~~
2021-07-15 02:02:28.101 24 INFO placement.requestlog [req-a9d4942e-411a-4901-b05e-98ec1239ef70 31e1d736a759444f92346daf932243ff 91063c94413548b695edc6a0ef1f1252 - default default] 172.17.1.24 "GET /placement/resource_providers&uuid=dbba1bf7-6e97-4dcb-8d4c-37fe36633358" status: 404 len: 162 microversion: 1.14
~~~

However it should send request to /placment/resource_provider?uuid=<id> instead
~~~
2021-07-15 02:08:32.203 24 INFO placement.requestlog [req-03a20fff-644d-4cbf-abba-12656c2d9299 06b547a0af8f49fd8239c85ce5d9571b 942783ae248c4e9eb353a6e6b327bda5 - default default] 172.17.1.24 "GET /placement/resource_providers?uuid=dbba1bf7-6e97-4dcb-8d4c-37fe36633358" status: 200 len: 872 microversion: 1.14
~~~


Version-Release number of selected component (if applicable):
The issue can be reproduced in 16.1.6 .

How reproducible:
Always

Steps to Reproduce:
1. run "nova-manage placement audit" with --resource_provider option

Actual results:
The command always fails with "Resource provider with UUID <uuid> does not exist."

Expected results:
The command completes without error

Additional info:

Comment 3 smooney 2022-03-24 16:00:44 UTC
im removing the triaged keyword this is not traiged properly this was created to track fixing the upstream but but we need 4 BZs 18.0 17.0 16.2 and 16.1 if this need to be fix all the way to 16.1

this likely should be kept for the 18 bz and then we should clone it for the rest.

Comment 17 errata-xmlrpc 2022-06-22 16:02:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 16.2.3 (Train)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:4793


Note You need to log in before you can comment on or make changes to this bug.