Ask Your Question

Unable to update RC inventory in resource provider

asked 2018-11-22 00:12:46 -0500

ns1-sundar gravatar image

updated 2018-12-06 14:59:57 -0500

I have a devstack install on Centos 7.5, based on top of trunk. I am able to update the Placement db with a new resource provider (RP), resource class (RC) and traits, and also associate those traits with the newly created RP. However, when I try to update the RC inventory for that RP, that fails with 400 Bad Request. There is no info in 'journalctl -xe -u devstack@placement-api' to know what went wrong.


  • "curl -s -H "X-Auth-Token: $MY_TOKEN" -H "OpenStack-API-Version: placement 1.30" http://<ip>/placement/resource_classes" shows the RC foo that I created.

  • GET /placement/resource_providers shows the RP that I created, with RP generation 1.

  • GET /placement/traits shows the traits A and B that I created.

  • GET /placement/resource_providers/{uuid}/traits shows that the 2 traits are associated with the RP.

  • However:

curl -sSLf -H 'X-Auth-Token: ...' -H 'OpenStack-API-Version: placement 1.30' -H 'Content-Type: application/json' -X PUT -d '{"resource_provider_generation": 1, "total": 1}' (

returns 400 Bad Request.

  • GET /placement/resource_providers/{uuid}/inventories returns:

    {"resource_provider_generation": 1, "inventories": {}}

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-12-06 18:12:13 -0500

ns1-sundar gravatar image

Answering my own questions after IRC discussion. The PUT failed because it only updates the RP inventory, which must exist already. It is easier to use:

$ openstack resource provider inventory set ...
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-11-22 00:12:46 -0500

Seen: 157 times

Last updated: Dec 06 '18