code 500 trying delete broken snapshot

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

Bug Description

If we have snapshot with status different from 'available' and 'error' and trying delete it we get next error in m-api:

2014-06-03 07:14:31 ERROR [manila.api.middleware.fault] Caught error: Invalid share snapshot: Share Snapshot status must be 'available' or 'error'.
Traceback (most recent call last):
  File "/opt/stack/manila/manila/api/middleware/fault.py", line 73, in __call__
    return req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 632, in __call__
    return self.app(env, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/manila/manila/api/openstack/wsgi.py", line 803, in __call__
    content_type, body, accept)
  File "/opt/stack/manila/manila/api/openstack/wsgi.py", line 851, in _process_stack
    action_result = self.dispatch(meth, request, action_args)
  File "/opt/stack/manila/manila/api/openstack/wsgi.py", line 927, in dispatch
    return method(req=request, **action_args)
  File "/opt/stack/manila/manila/api/v1/share_snapshots.py", line 87, in delete
    self.share_api.delete_snapshot(context, snapshot)
  File "/opt/stack/manila/manila/policy.py", line 116, in wrapped
    return func(self, context, target_obj, *args, **kwargs)
  File "/opt/stack/manila/manila/share/api.py", line 281, in delete_snapshot
    raise exception.InvalidShareSnapshot(reason=msg)
InvalidShareSnapshot: Invalid share snapshot: Share Snapshot status must be 'available' or 'error'.
2014-06-03 07:14:31 INFO [manila.api.middleware.fault] http://172.18.198.52:8786/v1/47323ed7372a401ca2502a3c4dac5909/snapshots/33c6113a-bdf7-4080-8418-9620d981e1d9 returned with HTTP 500

This case should be handled properly without error 500.

Changed in manila:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to manila (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/97471

Changed in manila:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to manila (master)

Reviewed: https://review.openstack.org/97471
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=8dd80bdccaf1d7bf7c8ff8bbcfdd28fc492b97f8
Submitter: Jenkins
Branch: master

commit 8dd80bdccaf1d7bf7c8ff8bbcfdd28fc492b97f8
Author: vponomaryov <email address hidden>
Date: Tue Jun 10 14:50:13 2014 +0300

    Cleaned up exception module and added unittests

    Removed unused exceptions and fixed several inheritance
    issues, that causes wrong responce codes.

    exceptions MigrationNotFound and MigrationNotFoundByStatus
    are left, because manila just doesn't have migrations yet.

    Change-Id: Icf39422927fc7754c5c47ab717fad178ed44a0dc
    Related-Bug: #1325934

Changed in manila:
status: In Progress → Fix Released
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.