Quota tally not handling unlimited values correctly

Bug #1084976 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Victoria Martinez de la Cruz
Folsom
Fix Released
Medium
Victoria Martinez de la Cruz

Bug Description

Horizon seems to be interpreting "-1" (unlimited) quotas literally when tallying quotas, setting the 'available' field to 0 instead of infinity (probably because the expectation used to be that an unlimited quota would always be returned as None).

https://github.com/openstack/horizon/blob/master/openstack_dashboard/usage/quotas.py#L30 -- also checking for -1 when tallying unlimited quotas solves the problem.

The problem becomes more obvious in the context of ux improvements based on quotas such as https://bugs.launchpad.net/horizon/+bug/1033829, but it's also possible to check it by doing "nova quota-update --ram -1 <project_id>" then visit the project overview page: it will read "Used X MB of -1 MB Available RAM". It should be "Used X MB of inf MB Available RAM" -- although it would also be nice to display a nicer message when there are no limit!

Changed in horizon:
assignee: nobody → vKmC (vickymsee)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/17326
Committed: http://github.com/openstack/horizon/commit/aec73a78b2b3dc7cabe65b246cd5c3c4d872e0ec
Submitter: Jenkins
Branch: master

commit aec73a78b2b3dc7cabe65b246cd5c3c4d872e0ec
Author: Victoria Martínez de la Cruz <email address hidden>
Date: Sun Dec 2 22:34:04 2012 -0300

    Add a check for unlimited quotas

    This extra check will prevent Horizon to misunderstand "-1" value when tallying quotas,
    setting the "Available" field to inf instead of 0.

    Fixes: bug #1084976
    Change-Id: Ib316a15ac8ffa8ed4e4c51c02d5956db57fb6f6e

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/19486

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/folsom)

Reviewed: https://review.openstack.org/19486
Committed: http://github.com/openstack/horizon/commit/ebc5e6db042cbd3ba16fc06ddfb8a785dea238cb
Submitter: Jenkins
Branch: stable/folsom

commit ebc5e6db042cbd3ba16fc06ddfb8a785dea238cb
Author: Victoria Martínez de la Cruz <email address hidden>
Date: Fri Jan 11 17:43:35 2013 -0300

    Add a check for unlimited quotas

    This extra check will prevent Horizon to
    misunderstand "-1" value when tallying quotas,
    setting the "Available" field to inf
    instead of 0.

    Change-Id: Idfeb9a10b8ce8eea1a39b3d48dffe08d6450fadd
    Fixes: bug #1084976

tags: added: in-stable-folsom
Mark McLoughlin (markmc)
tags: removed: in-stable-folsom
Thierry Carrez (ttx)
Changed in horizon:
milestone: grizzly-2 → 2013.1
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.