Revision history [back]

click to hide/show revision 1
initial version

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 bar 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 bar.

  • 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

returns 400 Bad Request.

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

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

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 bar that I created 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 bar.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

returns 400 Bad Request.

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

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