Comment 0 for bug 1449221

Revision history for this message
Scott DAngelo (scott-dangelo) wrote : Nova volume-detach lacks '--force' command for cleanup

Cinder volumes can get stuck in a state of 'attaching' or 'detaching' and they need to be cleaned up or they will be incapable of being used. This is not possible because python-novaclient 'nova volume-detach' lacks a '--force' option.
Nova will need to call Cinder force_detach. Cinder already has a force_detach API that should also be called to ask the storage driver to terminate_connection and detach the volume from the backend. The Nova BlockDeviceMapping table can have an entry indicating that a volume is attached. Changes to nova to allow a force_detach are needed to remove an entry for a given volume in the case where the volume gets stuck in 'attaching' or 'detaching'.