Unable to update RC inventory in resource provider
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": {}}