invalid quota resource when update volume type name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Triaged
|
Medium
|
haixin |
Bug Description
When we need to update volume type name, will call:
QUOTAS.
in this function the code below:
def update_
for quota in ('volumes', 'gigabytes', 'snapshots'):
old_res = "%s_%s" % (quota, old_type_name)
new_res = "%s_%s" % (quota, new_type_name)
db.
db.
db.
As everyone knows, there is no such resource named as "%s_%s" % (quota_type, volulme_type_name) in database table of quota_classes.
in table quota_classes, there are only quota default value for new project.
Unless we manually set the default quota for volume type. These values are default values, and we don't know how the user will name the volume type before we create it,So it doesn't make sense to preset a default value for a volume type in advance.
so resource named as "%s_%s" % (quota_type, volulme_type_name) only exist in table quota_usages or quotas if we set quota for specified volume type.
will not appear in table of quota_classes.
so we not need to call quota_class_
Changed in cinder: | |
assignee: | nobody → haixin (haixin77) |
summary: |
- invalid quota resource when update volume type + invalid quota resource when update volume type name |
description: | updated |
tags: | added: quota volume-type |
Changed in cinder: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Change abandoned by "haixin <email address hidden>" on branch: master /review. opendev. org/c/openstack /cinder/ +/768858
Review: https:/