Quota error after forced backup of in-use volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Alan Bishop |
Bug Description
When a non-admin creates a forced backup of an in-use volume, when the backup completes the volume's quota is deleted from the project's quota usage. This problem does not happen when an admin creates a forced backup.
Steps:
------
1) Become non-admin (. openrc demo demo)
2) Create volume (5 GB)
Quota usage for demo project 7371691aa751491
volume:
[stack@devstack devstack]$ cinder quota-usage 7371691aa751491
+------
| Type | In_use | Reserved | Limit | Allocated |
+------
| backup_gigabytes | 0 | 0 | 1000 | |
| backups | 0 | 0 | 10 | |
| gigabytes | 5 | 0 | 1000 | |
| gigabytes_
| groups | 0 | 0 | 10 | |
| per_volume_
| snapshots | 0 | 0 | 10 | |
| snapshots_
| volumes | 1 | 0 | 10 | |
| volumes_lvmdriver-1 | 1 | 0 | -1 | |
+------
Steps:
------
3) Spawn an instance and attach the volume
4) Create a (forced) backup of the volume
While the backup is running, quota usage shows the volume, plus one 5 GB
backup:
[stack@devstack devstack]$ cinder quota-usage 7371691aa751491
+------
| Type | In_use | Reserved | Limit | Allocated |
+------
| backup_gigabytes | 5 | 0 | 1000 | |
| backups | 1 | 0 | 10 | |
| gigabytes | 5 | 0 | 1000 | |
| gigabytes_
| groups | 0 | 0 | 10 | |
| per_volume_
| snapshots | 0 | 0 | 10 | |
| snapshots_
| volumes | 1 | 0 | 10 | |
| volumes_lvmdriver-1 | 1 | 0 | -1 | |
+------
After the backup completes, the quota usage still shows the 5 GB backup,
but the volume's quota is missing.
[stack@devstack devstack]$ cinder quota-usage 7371691aa751491
+------
| Type | In_use | Reserved | Limit | Allocated |
+------
| backup_gigabytes | 5 | 0 | 1000 | |
| backups | 1 | 0 | 10 | |
| gigabytes | 0 | 0 | 1000 | |
| gigabytes_
| groups | 0 | 0 | 10 | |
| per_volume_
| snapshots | 0 | 0 | 10 | |
| snapshots_
| volumes | 0 | 0 | 10 | |
| volumes_lvmdriver-1 | 0 | 0 | -1 | |
+------
[stack@devstack devstack]$ openstack volume list
+------
| ID | Name | Status | Size | Attached to |
+------
| b1fa0ccc-
+------
Changed in cinder: | |
assignee: | nobody → Alan Bishop (alan-bishop) |
Fix proposed to branch: master /review. openstack. org/578201
Review: https:/