Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Allow deletion of volumes stuck in deleting state #1722

Closed
shivanshu21 opened this issue Aug 8, 2017 · 1 comment
Closed

Allow deletion of volumes stuck in deleting state #1722

shivanshu21 opened this issue Aug 8, 2017 · 1 comment

Comments

@shivanshu21
Copy link
Contributor

shivanshu21 commented Aug 8, 2017

Volumes that experience failure in deletion (eg. If the internal volume deletion failed) are stuck in Deleting state.

The next time, the plugin doesn't allow them to proceed to deletion as it is expecting the state "Ready". If the state is already deleting, the deletion should just proceed.

root@ubuntu16B ~: docker volume rm vol1
Error response from daemon: unable to remove volume: remove vol1: VolumeDriver.Remove: Failed to remove internal volume vol1. Reason: Error response from daemon: {"message":"unable to remove volume: remove InternalVolvol1: volume is in use - [572265485e36d56edcd3a234972c5a1d9e3251e53f05943ca0fe6418d563aa3b, 8719b601cd469d3f24d92833c7ff5e61aaf0b0fe2616700d819cc58a2467606e]"} Check the status of the volumes belonging to driver vsphere
root@ubuntu16B ~: docker volume ls
DRIVER VOLUME NAME
vsphere:latest InternalVolvol1@datastore1
kahuna:latest vol1
root@ubuntu16B ~: docker volume inspect vol1
[
{
"Driver": "kahuna:latest",
"Labels": {},
"Mountpoint": "/mnt/vmdk/vol1",
"Name": "vol1",
"Options": {},
"Scope": "global",
"Status": {
"Clients": null,
"File server Port": 0,
"Global Refcount": 0,
"Service name": "",
"Volume Status": "Deleting"
}
}
]
root@ubuntu16B ~:

root@ubuntu16B ~: docker volume rm vol1
Error response from daemon: unable to remove volume: remove vol1: VolumeDriver.Remove: Remove failed: Failed to set volume state to deleting. Containers on other host VM are still using volume vol1. Host VMs using this volume:
root@ubuntu16B ~:

@luomiao
Copy link
Contributor

luomiao commented Aug 9, 2017

When the deleting of internal volume is failed, Remove() should set the state of volume back from Deleting to Ready before return error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants