← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1453322] [NEW] The strange case of the quota_items config option

 

Public bug reported:

The quota_items option [1] declares which resources will be subject to quota limiting.
Then the code, for each value, there, will look for an option named quota_<resource_name>, when registering resources with the quota engine. This happens at module load time.

This is pretty much how networks, ports, and subnets have been registering themselves with the quota engine so far.
All the other resources for which neutron does quota limiting, are a bit smarter, and register themselves when the respective API extensions are loaded.

Indeed there are config options for routers, floating ips, and other resources, which are not listed in quota_items. While this is not an error, it is surely confusing for operators. 
In order to avoid making the configuration schema dependent on the value for a conf option (eg: requiring a quota_meh option if 'meh' is in quota_items), the system picks a 'default limit' for all resources for which there is no corresponding limit. This avoid failures but is, again, fairly confusing.
Registration happens at module load. This is probably not great from a practical perspective. It's also bad for maintainability, and it is a bit ugly from a coding style perspective.
And finally it is unclear why resource registration is done in a way for core resources and in another way for all other resources. Consistency is somewhat important.

the quota_items options should probably just be deprecated

[1]
http://git.openstack.org/cgit/openstack/neutron/tree/neutron/quota.py#n35

** Affects: neutron
     Importance: Undecided
     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/1453322

Title:
  The strange case of the quota_items config option

Status in OpenStack Neutron (virtual network service):
  In Progress

Bug description:
  The quota_items option [1] declares which resources will be subject to quota limiting.
  Then the code, for each value, there, will look for an option named quota_<resource_name>, when registering resources with the quota engine. This happens at module load time.

  This is pretty much how networks, ports, and subnets have been registering themselves with the quota engine so far.
  All the other resources for which neutron does quota limiting, are a bit smarter, and register themselves when the respective API extensions are loaded.

  Indeed there are config options for routers, floating ips, and other resources, which are not listed in quota_items. While this is not an error, it is surely confusing for operators. 
  In order to avoid making the configuration schema dependent on the value for a conf option (eg: requiring a quota_meh option if 'meh' is in quota_items), the system picks a 'default limit' for all resources for which there is no corresponding limit. This avoid failures but is, again, fairly confusing.
  Registration happens at module load. This is probably not great from a practical perspective. It's also bad for maintainability, and it is a bit ugly from a coding style perspective.
  And finally it is unclear why resource registration is done in a way for core resources and in another way for all other resources. Consistency is somewhat important.

  the quota_items options should probably just be deprecated

  [1]
  http://git.openstack.org/cgit/openstack/neutron/tree/neutron/quota.py#n35

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


Follow ups

References