← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1501948] [NEW] Quota enforcement does not work in Pecan

 

Public bug reported:

Pecan still uses old-style, reservation-less quota enforcement [1]

Unfortunately this just does not work.
There are two independent issues:
- only extension resources are being registered with the quota engine, because resource registration for core resources used to happen in the "API router" [2]. This is clear from the following message in the logs:

DEBUG neutron.pecan_wsgi.hooks.quota_enforcement [req-6643e848-0cec-
45d9-88d8-35f49a60b8b5 demo 3f3039040f0e434d8e10d7f43dabfe75] Unknown
quota resources ['network']

- the enforcement hook still passes the plural to the resource's count
method. The plural resource name parameter was removed during liberty
[3] as it was not necessary, and this causes a non negligible issue that
it's being interpreted as the tenant_id. [4]


[1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/pecan_wsgi/hooks/quota_enforcement.py
[2] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/router.py
[3] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/quota/resource.py#n134
[4] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/pecan_wsgi/hooks/quota_enforcement.py#n48

** Affects: neutron
     Importance: High
     Assignee: Salvatore Orlando (salvatore-orlando)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1501948

Title:
  Quota enforcement does not work in Pecan

Status in neutron:
  In Progress

Bug description:
  Pecan still uses old-style, reservation-less quota enforcement [1]

  Unfortunately this just does not work.
  There are two independent issues:
  - only extension resources are being registered with the quota engine, because resource registration for core resources used to happen in the "API router" [2]. This is clear from the following message in the logs:

  DEBUG neutron.pecan_wsgi.hooks.quota_enforcement [req-6643e848-0cec-
  45d9-88d8-35f49a60b8b5 demo 3f3039040f0e434d8e10d7f43dabfe75] Unknown
  quota resources ['network']

  - the enforcement hook still passes the plural to the resource's count
  method. The plural resource name parameter was removed during liberty
  [3] as it was not necessary, and this causes a non negligible issue
  that it's being interpreted as the tenant_id. [4]

  
  [1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/pecan_wsgi/hooks/quota_enforcement.py
  [2] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/router.py
  [3] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/quota/resource.py#n134
  [4] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/pecan_wsgi/hooks/quota_enforcement.py#n48

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1501948/+subscriptions


Follow ups