Public bug reported: There is currently a Cinder spec in-progress that proposes the removal of file locks that are present during volume attach / detach and a few other locations. Nova does not appear to be handling exceptions thrown during the volume detach process in a way that notifies the user why the detach failed.
Example of what happens when an exception is thrown during a detach by Cinder's API: http://paste.openstack.org/show/KBpPWxfVMmQ5GmLeAFpG/ Related Cinder WIP spec giving an overview of why Cinder API might throw exceptions now: https://review.openstack.org/#/c/149894/ Related Cinder WIP patch showing potential changes to Cinder API: https://review.openstack.org/#/c/153748/ When a volume is in an 'ING' state, Cinder API calls that interact with that volume will return an exception notifying a caller that that volume is busy. There may be other calls to the Cinder API (that deal with volumes) that Nova does not handle an exception from. Exceptions from those calls will need to be handled, too. In order to reproduce the above exception: Add 'raise exception.VolumeIsBusy(message="sample")' to the top of the begin_detaching function in cinder/api.py. restart c-api. After attaching a volume in OpenStack, attempt to detach it. The above exception will occur in n-api. ** Affects: nova Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1458958 Title: Exceptions from Cinder detach volume API not handled Status in OpenStack Compute (Nova): New Bug description: There is currently a Cinder spec in-progress that proposes the removal of file locks that are present during volume attach / detach and a few other locations. Nova does not appear to be handling exceptions thrown during the volume detach process in a way that notifies the user why the detach failed. Example of what happens when an exception is thrown during a detach by Cinder's API: http://paste.openstack.org/show/KBpPWxfVMmQ5GmLeAFpG/ Related Cinder WIP spec giving an overview of why Cinder API might throw exceptions now: https://review.openstack.org/#/c/149894/ Related Cinder WIP patch showing potential changes to Cinder API: https://review.openstack.org/#/c/153748/ When a volume is in an 'ING' state, Cinder API calls that interact with that volume will return an exception notifying a caller that that volume is busy. There may be other calls to the Cinder API (that deal with volumes) that Nova does not handle an exception from. Exceptions from those calls will need to be handled, too. In order to reproduce the above exception: Add 'raise exception.VolumeIsBusy(message="sample")' to the top of the begin_detaching function in cinder/api.py. restart c-api. After attaching a volume in OpenStack, attempt to detach it. The above exception will occur in n-api. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1458958/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp