retype can result in negative values in quota_usages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Ollie Leahy |
Bug Description
On a devstack installation with two lvm volume types created, retyping from one volume type to another can result in negative vales in the 'reserved' column in the quota_usages table.
To make this happen you need to pass different, probably admin, username and password on the command line.
ubuntu@
+----+-
| id | resource | reserved |
+----+-
| 1 | gigabytes | 0 |
| 2 | gigabytes_
| 3 | volumes_lvmdriver-1 | 0 |
| 4 | volumes | 0 |
| 5 | gigabytes_LUKS | 0 |
| 6 | volumes_LUKS | 0 |
| 7 | gigabytes_lvm2 | 0 |
| 8 | volumes_lvm2 | 0 |
+----+-
Retype a volume belonging to 'demo' but using 'admin' creds:
ubuntu@
Now demo has negative values:
ubuntu@
+----+-
| id | resource | reserved |
+----+-
| 1 | gigabytes | -1 |
| 2 | gigabytes_
| 3 | volumes_lvmdriver-1 | -1 |
| 4 | volumes | -1 |
| 5 | gigabytes_LUKS | 0 |
| 6 | volumes_LUKS | 0 |
| 7 | gigabytes_lvm2 | 0 |
| 8 | volumes_lvm2 | 0 |
+----+-
and the admin user is left with an incorrect positive value for the same field:
ubuntu@
+----+-
| id | resource | reserved |
+----+-
| 9 | gigabytes | 1 |
| 10 | gigabytes_
| 11 | volumes_lvmdriver-1 | 1 |
| 12 | volumes | 1 |
+----+-
The side effect of this bug is that demo can now create one more volume than is specified b their volume quota. Retyping another volume in this way will allow them to create two extra volumes.
tags: | added: quota retype |
Changed in cinder: | |
assignee: | nobody → Deepti Ramakrishna (dramakri) |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/235427
Review: https:/