Faults raised by OpenStack API Resource handlers fail to be reported properly

Bug #886353 reported by Ewan Mellor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Ewan Mellor
Diablo
Fix Released
Undecided
Unassigned

Bug Description

Faults (as in nova.api.openstack.faults.Fault) raised by OpenStack API handlers called through nova.api.openstack.wsgi.Resource are not being reported properly. The problem is that Resource.__call__ tries to wrap all webob.exc.HTTPException subclasses in a Fault, but Fault is itself a subclass of HTTPException, and so it tries to wrap a Fault in a Fault. This doesn't work because Fault expects its wrapped_exc to have an explanation field, but Fault itself does not.

Ewan Mellor (ewanmellor)
Changed in nova:
status: New → In Progress
assignee: nobody → Ewan Mellor (ewanmellor)
Revision history for this message
Ewan Mellor (ewanmellor) wrote :
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/1365
Committed: http://github.com/openstack/nova/commit/01150b5d0d482a83a1065c2a6d62f4963c9f838d
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 01150b5d0d482a83a1065c2a6d62f4963c9f838d
Author: Ewan Mellor <email address hidden>
Date: Fri Nov 4 14:00:37 2011 -0700

    Bug #886353: Faults raised by OpenStack API Resource handlers fail to be reported properly

    In Resource.__call__, catch any faults.Fault that are thrown by the request
    handler, and make those the action_result. This means that the Fault doesn't
    fall into the exception handler below (faults.Fault is a subclass of
    webob.exc.HTTPException) and so we don't attempt to wrap a Fault in a Fault.

    Change-Id: Ica31723ddd621332ec4be75db0d675bc98905e43

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/diablo)

Reviewed: https://review.openstack.org/2180
Committed: http://github.com/openstack/nova/commit/1270e11ef9fb3723e4a86bfe99d500ffbe615a4d
Submitter: Jenkins
Branch: stable/diablo

commit 1270e11ef9fb3723e4a86bfe99d500ffbe615a4d
Author: Ewan Mellor <email address hidden>
Date: Fri Nov 4 14:00:37 2011 -0700

    Bug #886353: Faults raised by OpenStack API Resource handlers fail to be reported properly

    In Resource.__call__, catch any faults.Fault that are thrown by the request
    handler, and make those the action_result. This means that the Fault doesn't
    fall into the exception handler below (faults.Fault is a subclass of
    webob.exc.HTTPException) and so we don't attempt to wrap a Fault in a Fault.

    (cherry picked from commit 01150b5d0d482a83a1065c2a6d62f4963c9f838d)

    Change-Id: Ica31723ddd621332ec4be75db0d675bc98905e43

tags: added: in-stable-diablo
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-2 → 2012.1
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.