Quotas management is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
John Griffith |
Bug Description
There several issues with quota management noticed during using Cinder with Folsom2 release.
1. Any changes to quotas made by nova quota-update modify only 'quota' table in nova DB. This causes cinder to ignore any changes in volume quotas.
2. After looking to cinder/quota.py and to cinder DB i see that getting the quotas is broken even if there is something in cinder DB. It takes default quotas as a dictionary and then update it from the database, but field names in database and default dictionary don't match. See code below.
def _get_default_
defaults = {
'cores': FLAGS.quota_cores,
'ram': FLAGS.quota_ram,
'volumes': FLAGS.quota_
}
# -1 in the quota flags means unlimited
return defaults
def get_project_
defaults = _get_default_
if context.
quota = db.quota_
for key in defaults.keys():
if key in quota:
return defaults
class Quota(BASE, CinderBase):
"""Represents a single quota override for a project.
If there is no row for a given project id and resource, then the
default for the quota class is used. If there is no row for a
given quota class and resource, then the default for the
deployment is used. If the row is present but the hard limit is
Null, then the resource is unlimited.
"""
__tablename__ = 'quotas'
id = Column(Integer, primary_key=True)
project_id = Column(String(255), index=True)
resource = Column(String(255))
hard_limit = Column(Integer, nullable=True)
Changed in cinder: | |
importance: | Undecided → High |
milestone: | none → folsom-3 |
Changed in cinder: | |
assignee: | nobody → John Griffith (john-griffith) |
status: | New → Triaged |
Changed in cinder: | |
milestone: | folsom-3 → folsom-rc1 |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | folsom-rc1 → 2012.2 |
Fix proposed to branch: master /review. openstack. org/11510
Review: https:/