quota not considered when import backup resource
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Jay Bryant |
Bug Description
When import backup resource, cinder doesn't consume any backup related quotas, but when the imported backup resource is deleted, the quota will be decreased.
Step to reproduce:
1. import backup and show quota usage:
```
➜ ~ cinder backup-import cinder.
+------
| Property | Value |
+------
| id | 2c8c78bb-
| name | None |
+------
➜ ~ cinder quota-usage ea2e3ae4fdd8447
+------
| Type | In_use | Reserved | Limit | Allocated |
+------
| backup_gigabytes | 0 | 0 | 1000 | |
| backups | 0 | 0 | 10 | |
| gigabytes | 0 | 0 | 1000 | |
| groups | 0 | 0 | 10 | |
| per_volume_
| snapshots | 0 | 0 | 10 | |
| volumes | 0 | 0 | 10 | |
+------
```
2. create a new backup and show quota usage:
```
cinder backup-create 3a8c6127-
+------
| Property | Value |
+------
| id | efbd7f3a-
| name | None |
| volume_id | 3a8c6127-
+------
➜ ~ cinder backup-list
+------
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+------
| 2c8c78bb-
| efbd7f3a-
+------
➜ ~ cinder quota-usage ea2e3ae4fdd8447
+------
| Type | In_use | Reserved | Limit | Allocated |
+------
| backup_gigabytes | 1 | 0 | 1000 | |
| backups | 1 | 0 | 10 | |
| gigabytes | 1 | 0 | 1000 | |
| groups | 0 | 0 | 10 | |
| per_volume_
| snapshots | 0 | 0 | 10 | |
| volumes | 1 | 0 | 10 | |
+------
```
3. delete imported backup resource and show quota usage:
```
cinder backup-delete 2c8c78bb-
Request to delete backup 2c8c78bb-
➜ ~ cinder quota-usage ea2e3ae4fdd8447
+------
| Type | In_use | Reserved | Limit | Allocated |
+------
| backup_gigabytes | 0 | 0 | 1000 | |
| backups | 0 | 0 | 10 | |
| gigabytes | 1 | 0 | 1000 | |
| groups | 0 | 0 | 10 | |
| per_volume_
| snapshots | 0 | 0 | 10 | |
| volumes | 1 | 0 | 10 | |
+------
```
Changed in cinder: | |
assignee: | TommyLike (hu-husheng) → Jay Bryant (jsbryant) |
Fix proposed to branch: master /review. openstack. org/585941
Review: https:/