Quota limit gets reduced even if volume creation is failed.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Opinion
|
Undecided
|
Unassigned |
Bug Description
If request for new volume results in error status, cinder does not clear quota consumed for new volume and count this in quota limit.
before creating volume limits were:
[root@controller ~(keystone_admin)]# cinder absolute-limits
+------
| Name | Value |
+------
| maxTotalBackupG
| maxTotalBackups | 10 |
| maxTotalSnapshots | 10 |
| maxTotalVolumeG
| maxTotalVolumes | 10 |
| totalBackupGiga
| totalBackupsUsed | 1 |
| totalGigabytesUsed | 9 |
| totalSnapshotsUsed | 2 |
| totalVolumesUsed | 5 |
+------
[root@controller ~(keystone_admin)]# cinder show 1955b6a9-
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2017-03-
| description | None |
| encrypted | False |
| id | 1955b6a9-
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test2 |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | error |
| updated_at | 2017-03-
| user_id | 94edd5c88daf4be
| volume_type | iscsi |
+------
[root@controller ~(keystone_admin)]# cinder absolute-limits
+------
| Name | Value |
+------
| maxTotalBackupG
| maxTotalBackups | 10 |
| maxTotalSnapshots | 10 |
| maxTotalVolumeG
| maxTotalVolumes | 10 |
| totalBackupGiga
| totalBackupsUsed | 1 |
| totalGigabytesUsed | 10 |
| totalSnapshotsUsed | 2 |
| totalVolumesUsed | 6 |
+------
As seen from the above output, volume creation failed and totalVolumeUsed is increased by the size of failed volume.
Changed in cinder: | |
status: | New → Confirmed |
tags: | added: cinder |
Changed in cinder: | |
assignee: | nobody → Sushma Gunda (sushma05) |
status: | Confirmed → In Progress |
Changed in cinder: | |
assignee: | Sushma Gunda (sushma05) → nobody |
An error volume is still a volume. IMO, it should be counted by quota.
Quota is a db record resource, so it is only related to db change. It doesn't care about the driver's status.
If error volumes is out of quota control, it means that users could create as many error volume as they can, don't you think it's a db accident?
even worse, users can first create an available volume and attach it to a vm, then set it's status to error. Then this volume will be out of quota limit but can still be used.
So why do you think the error volume should not be counted?