Ask Your Question
0

Unable to update RC inventory in resource provider

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

ns1-sundar gravatar image

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

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.

Details:

  • "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}' http://192.168.122.4/placement/resource_providers/cdc8624f-03bd-47a3-b8f6-8d05bd247929/inventories/CUSTOM_ACCELERATOR_FPGA (http://192.168.122.4/placement/resour...)

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
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 18 times

Last updated: Dec 06