os-used-limits API extension should optionally include the reserved count

Bug #1088606 reported by Eoghan Glynn
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Eoghan Glynn

Bug Description

By omitting the reserved count from the total<Resource>Used elements in the response, the os-used-limits API extension prevents the caller from gaining the most accurate picture of the actual headroom.

For example, if the current instances quota is 10, the in_use count is 9 and an instance creation is in-flight, then the values for maxTotalInstances and totalInstanceUsed will imply that there is headroom to create a further resource. In fact this will not be the case, as the single reserved instance will prevent a new instance being spun up.

We should support a query param to control whether the reserved count is included:

  GET /v2/<TENANT_ID>/limits => do not include reserved count

  GET /v2/<TENANT_ID>/limits?reserved=0 => do not include reserved count

  GET /v2/<TENANT_ID>/limits?reserved=1 => include reserved count in the total<Resource>Used values

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

Changed in nova:
assignee: nobody → Eoghan Glynn (eglynn)
status: New → In Progress
Revision history for this message
Eoghan Glynn (eglynn) wrote :

This fix, or equivalent, is required to fully address this Horizon bug:

   https://bugs.launchpad.net/horizon/+bug/1033829

(hence the "medium" as opposed to "low" severity).

Changed in nova:
milestone: none → grizzly-2
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/17805
Committed: http://github.com/openstack/nova/commit/4371509084c97072cc5f2fe16fe01f09b81b1af0
Submitter: Jenkins
Branch: master

commit 4371509084c97072cc5f2fe16fe01f09b81b1af0
Author: Eoghan Glynn <email address hidden>
Date: Mon Dec 10 19:18:50 2012 +0000

    Consider reserved count in os-user-limits extension

    Fixes bug 1088606

    Previously, the reserved count was not considered in the
    total<Resource>Used values returned, leading to a potentially
    inaccurate view of the actual headroom available when resource
    creation was in-flight.

    Now, the reserved count is optionally included, controlled
    by a new 'reserved' query parameter.

    Change-Id: If71ac6f8e428b58b7c80c67ad99124e4233102d1

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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