Absent a per-user quota for a resource, fall back to the per-project quota before default

Bug #1037590 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Vish Ishaya

Bug Description

Here are the semantics I expected of per-user quotas:

  if a per-user quota is set for the current user:
      bound their resource usage by that
  elif a per-project quota set for the current project:
      bound by that instead
  else:
      bound by the default quota

What we get in fact is a drop-thru' straight to the else clause, i.e. no fall-back on the per-project quota.

This would break if for example an F-2 install has some per-project quotas set, then upgrades to F-3, suddenly the old per-project quotas no longer apply (as there wouldn't be any per-user quotas set as yet).

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

Its straight-forward to over-ride the absent per-user quotas with the per-project threshold, however calculating the usage gets a bit intrusive into the DB code, as any quota having fallen back to per-project should be considered against the aggregate project usage (not just the usage for that individual user).

Changed in nova:
status: New → 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
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.