rbd driver imagebusy error should be fed back to user with useful message

Bug #1275900 reported by Edward Hope-Morley
6
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.

Tags: ceph drivers rbd
Revision history for this message
git-harry (git-harry) wrote :

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.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@git-harry I'd need to check the current implementation but I'm thinking we want something similar to how the driver deals with deleting a protected snapshot i.e. https://github.com/openstack/cinder/blob/master/cinder/volume/drivers/rbd.py#L666

Revision history for this message
git-harry (git-harry) wrote :

exception.SnapshotIsBusy will cause an error to be logged but will not be something a user sees. Once cinder-volume is handling the request I believe the only way to communicate an issue to the user would be to change the status of the volume.

Mike Perez (thingee)
tags: added: drivers
Revision history for this message
Eric Harney (eharney) wrote :

Appears to be fixed in bug 1256259.

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.