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

Bug #1749410 reported by Bence Romsics on 2018-02-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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 (, '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.

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

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