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

Bug #1749410 reported by Bence Romsics
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
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

Tags: doc placement
Revision history for this message
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Bence Romsics (bence-romsics)
status: Confirmed → In Progress
Revision history for this message
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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

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)
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :
Changed in nova:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.