Share delete action leads to Horizon unhandled error

Bug #1579114 reported by Valeriy Ponomaryov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
manila-ui
Fix Released
High
Valeriy Ponomaryov

Bug Description

If we delete share or snapshot with latest Manila UI code then we get following error in Horizon logs:

Internal Server Error: /project/shares/
Traceback (most recent call last):
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/tabs/views.py", line 133, in get
    preempted = table.maybe_preempt()
  File "/opt/stack/horizon/horizon/tables/base.py", line 1546, in maybe_preempt
    error = exceptions.handle(request, ignore=True)
  File "/opt/stack/horizon/horizon/exceptions.py", line 354, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/opt/stack/horizon/horizon/tables/base.py", line 1538, in maybe_preempt
    datum = new_row.get_data(request, obj_id)
  File "/opt/stack/manila-ui/manila_ui/dashboards/project/shares/shares/tables.py", line 144, in get_data
    share = manila.share_get(request, share_id)
  File "/opt/stack/manila-ui/manila_ui/api/manila.py", line 76, in share_get
    share_data = manilaclient(request).shares.get(share_id)
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/manilaclient/v2/shares.py", line 291, in get
    return self._get("/shares/%s" % share_id, "share")
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/manilaclient/base.py", line 140, in _get
    resp, body = self.api.client.get(url)
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/manilaclient/common/httpclient.py", line 167, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/manilaclient/common/httpclient.py", line 129, in _cs_request
    **kwargs)
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/manilaclient/common/httpclient.py", line 143, in _cs_request_with_retries
    resp, body = self.request(url, method, **kwargs)
  File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/manilaclient/common/httpclient.py", line 121, in request
    raise exceptions.from_response(resp, method, url)
NotFound: The resource could not be found. (HTTP 404) (Request-ID: req-cf9dfa00-b6da-4f98-b65d-e3bec3be8cd4)
[06/May/2016 15:00:58] "GET /project/shares/?action=row_update&table=shares&obj_id=3da04ddb-fa08-4117-af99-af0307d7e4ad HTTP/1.1" 500 114586

And "success" message appears in browser. Line with share/snapshot in table gets freezed - doesn't have "deleting" animation.

Changed in manila-ui:
importance: Undecided → High
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
milestone: none → newton-1
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (master)

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

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

Reviewed: https://review.openstack.org/314494
Committed: https://git.openstack.org/cgit/openstack/manila-ui/commit/?id=8d9433621ac8bdd9e9e6cb7de9b54120839246fe
Submitter: Jenkins
Branch: master

commit 8d9433621ac8bdd9e9e6cb7de9b54120839246fe
Author: Valeriy Ponomaryov <email address hidden>
Date: Tue May 10 13:11:30 2016 +0300

    Register Manilaclient exceptions in Horizon

    Add Manilaclient's NotFound exception to 'NOT_FOUND' exception family
    in Horizon. Without it we get error 500 from Horizon on pages with
    resource tables where something is being deleted and then not found.
    Do the same for "recoverable" and "unauthorized" types too.

    Also, remove redundant, already registered exceptions related to other
    projects from "manila_ui.exceptions" module.

    Change-Id: I1dffec243feb12783dceb705ff6191dbcc8b3aa5
    Closes-Bug: #1481902
    Closes-Bug: #1579114

Changed in manila-ui:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila-ui 2.2.0

This issue was fixed in the openstack/manila-ui 2.2.0 release.

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.