Quota defaults and limits are not deleted when a volume type is deleted

Bug #1952463 reported by Gorka Eguileor
6
This bug affects 1 person
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-d826-4a9d-b355-d6bc3042d519 | newtype | - | True |
+--------------------------------------+---------+-------------+-----------+

$ cinder quota-class-update --volumes 1 --snapshots 1 --gigabytes 1 --volume-type newtype default
+-----------------------+-------+
| Property | Value |
+-----------------------+-------+
| backup_gigabytes | 1000 |
| backups | 10 |
| gigabytes | 1000 |
| gigabytes___DEFAULT__ | -1 |
| gigabytes_lvmdriver-1 | -1 |
| gigabytes_newtype | 1 |
| groups | 10 |
| per_volume_gigabytes | -1 |
| snapshots | 10 |
| snapshots___DEFAULT__ | -1 |
| snapshots_lvmdriver-1 | -1 |
| snapshots_newtype | 1 |
| volumes | 10 |
| volumes___DEFAULT__ | -1 |
| volumes_lvmdriver-1 | -1 |
| volumes_newtype | 1 |
+-----------------------+-------+

$ cinder quota-update --volume-type newtype --volumes 2 a41464e54125407aab09e0236cce2c3c
+-----------------------+-------+
| Property | Value |
+-----------------------+-------+
| backup_gigabytes | 1000 |
| backups | 10 |
| gigabytes | 1000 |
| gigabytes___DEFAULT__ | -1 |
| gigabytes_lvmdriver-1 | -1 |
| gigabytes_newtype | 1 |
| groups | 10 |
| per_volume_gigabytes | -1 |
| snapshots | 10 |
| snapshots___DEFAULT__ | -1 |
| snapshots_lvmdriver-1 | -1 |
| 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 a41464e54125407aab09e0236cce2c3c
+-----------------------+-------+
| Property | Value |
+-----------------------+-------+
| backup_gigabytes | 1000 |
| backups | 10 |
| gigabytes | 1000 |
| gigabytes___DEFAULT__ | -1 |
| gigabytes_lvmdriver-1 | -1 |
| groups | 10 |
| per_volume_gigabytes | -1 |
| snapshots | 10 |
| snapshots___DEFAULT__ | -1 |
| snapshots_lvmdriver-1 | -1 |
| 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 |
+-----------------+

Tags: quotas
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/819692

Changed in cinder:
status: New → In Progress
Gorka Eguileor (gorka)
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/907153

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by "Rajat Dhasmana <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/819692
Reason: in favor of https://review.opendev.org/c/openstack/cinder/+/907153

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.