Nova-manage placement audit 'resource_provider' argument does not work

Bug #1908405 reported by Andrew Bonney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Medium
Unassigned

Bug Description

Running 'nova-manage placement audit --verbose' results in various reports of orphaned resources. However, if one resource provider is selected and 'nova-manage placement --verbose --resource_provider <uuid>' is used this always indicates that the resource provider does not exist.

For example:

(nova-21.0.1) root@infra1-nova-api-container-c49119df:~# nova-manage placement audit --verbose
Allocations were set against consumer UUID 7cbee49d-6af9-4cf7-98e9-b374872fe35b but no existing instances or active migrations are related.
Allocations for consumer UUID 7cbee49d-6af9-4cf7-98e9-b374872fe35b on Resource Provider 84840425-2122-4452-ab44-205c262b5ec5 can be deleted: {'VCPU': 1, 'MEMORY_MB': 512}

(nova-21.0.1) root@infra1-nova-api-container-c49119df:~# nova-manage placement audit --verbose --resource_provider 84840425-2122-4452-ab44-205c262b5ec5
Resource provider with UUID 84840425-2122-4452-ab44-205c262b5ec5 does not exist.

This is caused by an '&' rather than '?' in the construction of a URL query parameter at https://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L2670

Fixing this results in:

(nova-21.0.1) root@infra1-nova-api-container-c49119df:~# nova-manage placement audit --verbose --resource_provider 84840425-2122-4452-ab44-205c262b5ec5
Allocations were set against consumer UUID 7cbee49d-6af9-4cf7-98e9-b374872fe35b but no existing instances or active migrations are related.
Allocations for consumer UUID 7cbee49d-6af9-4cf7-98e9-b374872fe35b on Resource Provider 84840425-2122-4452-ab44-205c262b5ec5 can be deleted: {'VCPU': 1, 'MEMORY_MB': 512}

I'll submit a patch shortly.

Tags: nova-manage
Revision history for this message
Andrew Bonney (andrewbonney) wrote :
Changed in nova:
status: New → Triaged
tags: added: nova-manage
Changed in nova:
importance: Undecided → Medium
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Fix has been proposed https://review.opendev.org/c/openstack/nova/+/767348 marking this as InProgress

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by "Stephen Finucane <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/nova/+/767348

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.