← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1936278] Re: nova-manage placement audit command always fails with --resource_provider option

 

Reviewed:  https://review.opendev.org/c/openstack/nova/+/800855
Committed: https://opendev.org/openstack/nova/commit/1d3373dcf0a05d4a2c5b51fc1b74d41ec1bb1175
Submitter: "Zuul (22348)"
Branch:    master

commit 1d3373dcf0a05d4a2c5b51fc1b74d41ec1bb1175
Author: Takashi Kajinami <tkajinam@xxxxxxxxxx>
Date:   Thu Jul 15 11:25:15 2021 +0900

    Fix request path to query a resource provider by uuid
    
    To query a resource provider by uuid, request path should look like
     /resource_providers?uuid=<uuid>
    istead of
     /resource_providers&uuid=<uuid>
    
    This change fixes the wrong path so that "nova-manage placement audit"
    command can look up the target resource provider properly.
    
    Closes-Bug: #1936278
    Change-Id: I2ae7e9782316e3662e4e51e3f5ba0ef597bf281b


** 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/1936278

Title:
  nova-manage placement audit command always fails with
  --resource_provider option

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Description
  ===========
  nova-mange placement audit command always fails if --resource_provider option is used because the target resource provider is not found
  ~~~
  # 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 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 placement access log, the command is sending request with
  &uuid=<uuid> instead of ?uuid=<uuid>

  ~~~
  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
  ~~~

  Steps to reproduce
  ==================
  - Look up existing resource provider uuid
   $ openstack resource provider list
  - Run audit command with one of the ids specified
   $ nova-manage placement audit --resource_provider <rp id>

  Expected result
  ===============
  The command succeeds without error

  Actual result
  =============
  The command fails with the following error

  Resource provider with UUID <id> does not exist.

  Environment
  ===========
  This issue was initially found in the following downstream bug.
   https://bugzilla.redhat.com/show_bug.cgi?id=1982485

  Logs & Configs
  ==============
  N/A

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1936278/+subscriptions



References