Quotas functionality seems broken in Nova

Bug #1034384 reported by Rohit Karajgi
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Vish Ishaya

Bug Description

I checked out the latest Nova code
(Commit: https://github.com/openstack/nova/commit/a418654b070c63c4bed5e3e5523fb947934626f9)

Steps:
1. Login to Dashboard as an admin and set quota limits for your project.
2. Try creating instances for that project greater than the set quota limits.

Expected: Quota exceeded messages after an attempt to create instance once the quota limit is reached
Actual: Instances greater than the allowed quota were created

I checked the database entries after performing the above steps. The instances and cores usages were above the hard limits.
http://paste.openstack.org/show/20052/

This was reproducible for any quota resource (instances, cores, ram etc.)

Besides checking this manually, the Tempest Whitebox tests that test the quota functionality also captured these failures:

http://paste.openstack.org/show/20051/

Rohit Karajgi (rohitk)
description: updated
Revision history for this message
David Kranz (david-kranz) wrote :

This is a recent regression. See comment #1 in https://bugs.launchpad.net/tempest/+bug/1034129

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → High
milestone: none → folsom-3
status: New → Confirmed
Revision history for this message
Kylin CG (kylin7-sg) wrote :

It is caused by the get_user_quotas method in nova/quota.py.
It returned the default quotas for limit check, if the user's quotas of the project is not set...

Changed in nova:
assignee: nobody → Kylin CG (kylin7-sg)
Mark McLoughlin (markmc)
Changed in nova:
importance: High → Critical
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/11477

Changed in nova:
assignee: Kylin CG (kylin7-sg) → Eoghan Glynn (eglynn)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/11532

Changed in nova:
assignee: Eoghan Glynn (eglynn) → Vish Ishaya (vishvananda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/11477
Committed: http://github.com/openstack/nova/commit/1cf475d7a135c1078cf7df11c261618af501dc37
Submitter: Jenkins
Branch: master

commit 1cf475d7a135c1078cf7df11c261618af501dc37
Author: Eoghan Glynn <email address hidden>
Date: Thu Aug 16 16:11:03 2012 +0100

    Revert per-user-quotas

    See bug 1034384, bug 1037590.

    This reverts commit https://github.com/openstack/nova/commit/391f345d,
    but leaves the DB migration in place while adding a further
    migration to reverse it.

    The motivation for reversion is that the per-user quota logic would
    totally undermine the per-project quotas set for a pre-existing
    openstack install.

    The per-user quota logic could be re-introduced in a fixed state
    after Folsom-3.

    Change-Id: Idd4b55a2404a25f43f6737b661f828c28501066f

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/11532
Committed: http://github.com/openstack/nova/commit/d479c796f2893cbc2807f12908d03ba97cd821bb
Submitter: Jenkins
Branch: milestone-proposed

commit d479c796f2893cbc2807f12908d03ba97cd821bb
Author: Eoghan Glynn <email address hidden>
Date: Thu Aug 16 16:11:03 2012 +0100

    Revert per-user-quotas

    See bug 1034384, bug 1037590.

    This reverts commit https://github.com/openstack/nova/commit/391f345d,
    but leaves the DB migration in place while adding a further
    migration to reverse it.

    The motivation for reversion is that the per-user quota logic would
    totally undermine the per-project quotas set for a pre-existing
    openstack install.

    The per-user quota logic could be re-introduced in a fixed state
    after Folsom-3.

    Change-Id: Idd4b55a2404a25f43f6737b661f828c28501066f
    (cherry picked from commit bf7862222d25c9bd09671b90fed3287cbe26e488)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
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