Quota drivers should not throw QuotaResourceUknown

Bug #1430519 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Salvatore Orlando

Bug Description

Resource registration for Quota enforcement and management is performed by the quota engine [1].

However the task of verifying whether a resource is registered is left to the drivers [2]. This is conceptually wrong, and it also has the not so nice effect that the engine must pass registered resources to the driver as a parameter in limit_check.

[1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/quota.py#n238
[2] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/db/quota_db.py#n115

This was discovered during the implementation of a reservation system within the quota engine. The bug, albeit not critical, grants for a standalone patch not squashed into the commits for https://blueprints.launchpad.net/neutron/+spec/better-quotas

Tags: quota
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

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

Reviewed: https://review.openstack.org/163171
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f371f29cd0ed0fc3d8c4811dce8e2c31f39a0673
Submitter: Jenkins
Branch: master

commit f371f29cd0ed0fc3d8c4811dce8e2c31f39a0673
Author: Salvatore Orlando <email address hidden>
Date: Tue Mar 10 13:37:07 2015 -0700

    Raise QuotaResourceUnknown in the quota engine

    This patch lets the quota engine verify whether it manages a resource
    for which a limit is being checked.

    So far this check has been delegated to the drivers. This is
    conceptually wrong and also lead to code duplication.

    Unit tests and some docstrings are also fixed accordingly as a
    part of this patch.

    Closes-Bug: #1430519
    Related to blueprint better-quotas

    Change-Id: If1467881f13e30afa53a23b904f8eae5c7264834

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-3 → 2015.1.0
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.