generic driver: share can not be delete when volume is already deleted

Bug #1489573 reported by Thomas Bechtold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Thomas Bechtold

Bug Description

If you want to delete a share (with the generic driver) and the underlying volume was already delete (i.e. by hand with cinder delete) the share can not be deleted:

2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher [req-2273c9e8-f470-4ba7-bd78-fab24a276521 ] Exception during message handling: Volume 75115b51-c437-4f29-8ee1-f489b0ac5047 could not be found.
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher executor_callback))
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher executor_callback)
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 593, in delete_share_instance
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher {'status': constants.STATUS_ERROR_DELETING})
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 119, in __exit__
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 587, in delete_share_instance
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher share_server=share_server)
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 685, in delete_share
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher self._deallocate_container(self.admin_context, share)
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 528, in _deallocate_container
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher volume = self._get_volume(context, share['id'])
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 387, in _get_volume
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher return self.volume_api.get(context, volume_id)
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/volume/cinder.py", line 181, in wrapper
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher raise exception.VolumeNotFound(volume_id=volume_id)
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher VolumeNotFound: Volume 75115b51-c437-4f29-8ee1-f489b0ac5047 could not be found.
2015-08-27 18:57:58.757 22374 ERROR oslo_messaging.rpc.dispatcher
2015-08-27 18:58:02.718 22374 DEBUG oslo_service.loopingcall [req-716a5a28-0aa2-4049-88bc-71241575bc4b ] Fixed interval looping call 'manila.service.Service.report_state' sleeping for 9.99 seconds _run_loop /usr/lib/python2.7/site-packages/oslo_service/loopingcall.py:121

Changed in manila:
assignee: nobody → Thomas Bechtold (toabctl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/217863

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/217863
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=de5412356aa48a4af0b2ab0ba7b64e52240df299
Submitter: Jenkins
Branch: master

commit de5412356aa48a4af0b2ab0ba7b64e52240df299
Author: Thomas Bechtold <email address hidden>
Date: Thu Aug 27 21:08:52 2015 +0200

    Ignore unavailable volumes when deleting a share

    When deleting a share on a generic driver backend while the underlying
    cinder volume isn't available, ignore the VolumeNotFound exception
    and just continue to delete the share.
    This prevents the situation where a share can stay in error_deleting
    status forever.

    Closes-Bug: #1489573

    Change-Id: I8cb4400573366587ac11ed28b82bb960e3bbd566

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in manila:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-3 → 1.0.0
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.