rbd driver imagebusy error should be fed back to user with useful message
Bug #1275900 reported by
Edward Hope-Morley
This bug report is a duplicate of:
Bug #1256259: rbd driver should check for watchers before delete.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Undecided
|
Unassigned |
Bug Description
Currently if you delete an rbd-backed volume that still has rados watchers, the delete op will raise ImageBusy which is caught by the driver. The consequence is that the volume stays 'available' but the user is not informed as to why the delete failed. Would be useful to return a 404 and message such as "Please retry delete after 30 seconds have elapsed", similar to how deleting volumes that still have snapshots is dealt with.
I'm trying to work out how this would be implemented, at least superficially. Are there similar checks done for other aspects of the rbd driver or one of the other drivers?
As I understand it the check for snapshots is done in cinder/ volume/ api.py prior to the rpc.cast. This check as well as others are done by the cinder-api service against the database from what I can tell.
It seems like the api would always have to return a 202 in this situation but maybe there could be another status field associated with the volume to give more information regarding the last operation so the user can tell why it is still available.