Delete volume transfer while doing volume force delete operation
Bug #1270785 reported by
ling-yun
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
ling-yun | ||
Havana |
Fix Released
|
Undecided
|
ling-yun |
Bug Description
Doing volume force delete operation on volume-A will change volume-A's status to 'deleted', so all related data about volume-A should be deleted. Now current version's volume_destroy function doesn't delete related data of volume transfer. If there is volume transfer about volume-A, first do force delete operation on volume A, and thus the volume-A's transfer data would be residual. So remove the related data of volume transfer in volume_destroy function.
Changed in cinder: | |
milestone: | none → icehouse-3 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | icehouse-3 → 2014.1 |
To post a comment you must log in.
Volume transfer record residual when doing volume force delete, because there is no way to delete volume transfer through transfer api.
1. Create a volume /dev/stack- volumes# cinder create 1 ------- ------- ------- -----+- ------- ------- ------- ------- ------- --+ ------- ------- ------- -----+- ------- ------- ------- ------- ------- --+ 20T10:19: 31.000000 | 0213-4efc- b9d5-881091d3e2 24 | host-attr: host | None | mig-status- attr:migstat | None | mig-status- attr:name_ id | None | tenant- attr:tenant_ id | b758d3cb3e944d3 c824a43c1f61656 84 | 69de3a37df3c443 c2 | ------- ------- ------- -----+- ------- ------- ------- ------- ------- --+
root@devstack:
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2014-01-
| description | None |
| id | 116be7cb-
| metadata | {} |
| name | None |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| user_id | 21e2bffb18fe488
| volume_type | None |
+------
2. Create a volume transfer /dev/stack- volumes# cinder transfer-create 116be7cb- 0213-4efc- b9d5-881091d3e2 24 ------+ ------- ------- ------- ------- ------- ---+ ------+ ------- ------- ------- ------- ------- ---+ 20T10:19: 43.538202 | 30f2-4f3d- a3e6-d9f2299a3b 23 | 0213-4efc- b9d5-881091d3e2 24 | ------+ ------- ------- ------- ------- ------- ---+
root@devstack:
+------
| Property | Value |
+------
| auth_key | 071989743f0721df |
| created_at | 2014-01-
| id | 9c341c53-
| name | None |
| volume_id | 116be7cb-
+------
3. Force delete a volume /dev/stack- volumes# cinder force-delete 116be7cb- 0213-4efc- b9d5-881091d3e2 24
root@devstack:
mysql> select id, status from volumes where volumes. id='116be7cb- 0213-4efc- b9d5-881091d3e2 24';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1339
Current database: cinder
+------ ------- ------- ------- ------- ----+-- ------- + ------- ------- ------- ------- ----+-- ------- + 0213-4efc- b9d5-881091d3e2 24 | deleted | ------- ------- ------- ------- ----+-- ------- +
| id | status |
+------
| 116be7cb-
+------
1 row in set (0.08 sec)
4. Delete a volume transfer, error happpened /dev/stack- volumes# cinder transfer-delete 9c341c53- 30f2-4f3d- a3e6-d9f. ..
root@devstack: