Can't delete invalid attached volume

Bug #1791213 reported by Lisa Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Won't Fix
Undecided
Liang Fang

Bug Description

In case of a failure in communication between Nova and cinder, an instance can be deleted, but the attached volume is not properly marked as detached and cannot be deleted.

Environment:
Master branch (5df39425399abb584eaa056aaf7fa604479f4d25)

Test steps:
1. Create a volume and attach it to an instance.
2. Stop the cinder volume service and cinder schedule service. (To simulate disconnection between nova and cinder.)
3. Delete the VM. The VM is deleted successfully.
3. Start the cinder volume service and cinder schedule service
4. The volume status is just like the step 2 above, and the force-deletion is not allowed.

Detailed steps:
$ openstack volume list
+--------------------------------------+------+--------+------+---------------------------------------------------------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+------+--------+------+---------------------------------------------------------------+
| 3b73e216-f82b-470d-8e62-7040a9ebebc7 | | in-use | 1 | Attached to 7f9063d8-9de6-4c18-8819-f580e2a28038 on /dev/vda |
+--------------------------------------+------+--------+------+---------------------------------------------------------------+

$ nova show 3b73e216-f82b-470d-8e62-7040a9ebebc7
ERROR (CommandError): No server with a name or ID of '3b73e216-f82b-470d-8e62-7040a9ebebc7' exists.

$ openstack volume delete --force 3b73e216-f82b-470d-8e62-7040a9ebebc7
Failed to delete volume with name or ID '3b73e216-f82b-470d-8e62-7040a9ebebc7': Invalid volume: Volume must not be migrating, attached, belong to a group, have snapshots or be disassociated from snapshots after volume transfer. (HTTP 400) (Request-ID: req-d4352fbe-1d6b-4476-ad69-3654cd76947a)
1 of 1 volumes failed to delete.

Tags: deletion
Lisa Li (lisali)
Changed in cinder:
assignee: nobody → Lisa Li (lisali)
Liang Fang (liangfang)
Changed in cinder:
assignee: Lisa Li (lisali) → Liang Fang (liangfang)
Changed in cinder:
status: New → In Progress
Revision history for this message
Gorka Eguileor (gorka) wrote :

As discussed in the PTG, there is no need to modify the force delete operation.
You can delete the volume if you first detach it using the new Attach API [1].

[1]: https://developer.openstack.org/api-ref/block-storage/v3/#attachments

Changed in cinder:
status: In Progress → Won't Fix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder-specs (master)

Change abandoned by LisaLi (<email address hidden>) on branch: master
Review: https://review.openstack.org/600638

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Eric Harney (<email address hidden>) on branch: master
Review: https://review.openstack.org/598067
Reason: Spec is abandoned

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.