real exceptions get eaten when processing api resources

Bug #942431 reported by Chris Behrens on 2012-02-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Chris Behrens

Bug Description

2012-02-28 07:04:29 ERROR nova.api.openstack.wsgi [req-e67384e8-91c2-49ef-ad7b-18e4f84aa9d2 cbehrens openstack] 'NoneType' object is unsubscriptable
(nova.api.openstack.wsgi): TRACE: Traceback (most recent call last):
(nova.api.openstack.wsgi): TRACE: File "/usr/local/lib/python2.6/dist-packages/routes/", line 52, in __call__
(nova.api.openstack.wsgi): TRACE: qs = environ['QUERY_STRING']
(nova.api.openstack.wsgi): TRACE: KeyError: 'QUERY_STRING'

Bugs in other areas of the API (like when getting exceptions in the view builder) cause exceptions like the above which are very cryptic and impossible to debug.

Chris Behrens (cbehrens) on 2012-02-28
Changed in nova:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Chris Behrens (cbehrens)

Submitter: Jenkins
Branch: master

commit fab893f333fa80567ef12f6817d52459b28c84a4
Author: Chris Behrens <email address hidden>
Date: Tue Feb 28 07:34:08 2012 +0000

    TypeError API exceptions get logged incorrectly

    Fixes bug 942431

    LOG.exception() always logs sys.exc_info() which does not always
    represent the real exception we want to log. This changes the wsgi
    ResourceExceptionHandler context manager to LOG.error() the traeback
    info that's passed to __exit__()

    Change-Id: I0c3728a9ee740597feb828a513aea76e7849efc6

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers