OpenStack Compute (Nova)

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

Reported by Ewan Mellor on 2011-11-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Ewan Mellor
Diablo
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) on 2011-11-04
Changed in nova:
status: New → In Progress
assignee: nobody → Ewan Mellor (ewanmellor)
Thierry Carrez (ttx) on 2011-11-08
Changed in nova:
importance: Undecided → Medium

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) on 2011-12-14
Changed in nova:
milestone: none → essex-2
status: Fix Committed → Fix Released

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) on 2012-04-05
Changed in nova:
milestone: essex-2 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers