placement api-ref unclear if capacity is meant to be total or current

Bug #1749410 reported by Bence Romsics on 2018-02-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Wishlist
Bence Romsics

Bug Description

While exploring the newer microversions (here 1.4) of the placement API I found this part of the API reference unclear to me (https://developer.openstack.org/api-ref/placement/#list-resource-providers, 'resources' parameter):

"A comma-separated list of strings indicating an amount of resource of a specified class that a provider must have the capacity to serve:"

Based on the reference I cannot tell if the capacity is meant to be total or current (ie. total - current allocations).

Running a few queries it seems to me the actual behavior is to filter on total capacity. If that was the intended behavior then this report is just a tiny documentation bug I guess.

https://github.com/openstack/nova/blob/17.0.0.0rc1/placement-api-ref/source/parameters.yaml#L105

Sylvain Bauza (sylvain-bauza) wrote :

To be clear, the resource capacity is for the existing situation. Eg. say I want to have 2 vCPUs in my flavor, I'm asking Placement which Resource Provider is having 2 left vCPUs, ie. ( inventory * allocation_ratio - current allocations)

Changed in nova:
status: New → Confirmed
importance: Undecided → Wishlist

Fix proposed to branch: master
Review: https://review.openstack.org/544347

Changed in nova:
assignee: nobody → Bence Romsics (bence-romsics)
status: Confirmed → In Progress
Bence Romsics (bence-romsics) wrote :

Yep, my queries at the beginning were wrong. Thanks for the correction. Uploaded a change adding a few extra words to the ref.

Change abandoned by Bence Romsics (<email address hidden>) on branch: master
Review: https://review.openstack.org/544347
Reason: I guess this is pointless after Ia2a4f8f80ec68dd9c95e084c292a2fe2d6ec1b2d.

Chris Dent (cdent) on 2019-03-04
Changed in nova:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers