Quota defaults and limits are not deleted when a volume type is deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
Low
|
Gorka Eguileor |
Bug Description
When we delete a volume type that has default quota class limits and per project quota limits only the volume type is deleted and the quota limits will be left in the database.
Commands to reproduce the issue and show that the DB records are still there:
$ cinder type-create newtype
+------
| ID | Name | Description | Is_Public |
+------
| e2b3d54a-
+------
$ cinder quota-class-update --volumes 1 --snapshots 1 --gigabytes 1 --volume-type newtype default
+------
| Property | Value |
+------
| backup_gigabytes | 1000 |
| backups | 10 |
| gigabytes | 1000 |
| gigabytes_
| gigabytes_
| gigabytes_newtype | 1 |
| groups | 10 |
| per_volume_
| snapshots | 10 |
| snapshots_
| snapshots_
| snapshots_newtype | 1 |
| volumes | 10 |
| volumes___DEFAULT__ | -1 |
| volumes_lvmdriver-1 | -1 |
| volumes_newtype | 1 |
+------
$ cinder quota-update --volume-type newtype --volumes 2 a41464e54125407
+------
| Property | Value |
+------
| backup_gigabytes | 1000 |
| backups | 10 |
| gigabytes | 1000 |
| gigabytes_
| gigabytes_
| gigabytes_newtype | 1 |
| groups | 10 |
| per_volume_
| snapshots | 10 |
| snapshots_
| snapshots_
| snapshots_newtype | 1 |
| volumes | 10 |
| volumes___DEFAULT__ | -1 |
| volumes_lvmdriver-1 | -1 |
| volumes_newtype | 2 |
+------
$ cinder type-delete newtype
Request to delete volume type newtype has been accepted.
$ cinder quota-show a41464e54125407
+------
| Property | Value |
+------
| backup_gigabytes | 1000 |
| backups | 10 |
| gigabytes | 1000 |
| gigabytes_
| gigabytes_
| groups | 10 |
| per_volume_
| snapshots | 10 |
| snapshots_
| snapshots_
| volumes | 10 |
| volumes___DEFAULT__ | -1 |
| volumes_lvmdriver-1 | -1 |
+------
$ mysql cinder -e 'select resource from quota_classes where not deleted and resource like "%_newtype"'
+------
| resource |
+------
| volumes_newtype |
| snapshots_newtype |
| gigabytes_newtype |
+------
$ mysql cinder -e 'select resource from quotas where not deleted and resource like "%_newtype"'
+-----------------+
| resource |
+-----------------+
| volumes_newtype |
+-----------------+
summary: |
- Quota defaults and limits are not delete when a volume type is deleted + Quota defaults and limits are not deleted when a volume type is deleted |
Changed in cinder: | |
importance: | Undecided → Low |
tags: | added: quotas |
Fix proposed to branch: master /review. opendev. org/c/openstack /cinder/ +/819692
Review: https:/