stack crashes with AttributeError on e.reason if the server returns an error

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

Bug Description

If the direct API throws an exception, this shows up in the 'stack' CLI tool as an HTTPError. This is no longer being caught though, because some idiot (Bug #884018) put a URLError handler above the HTTPError handler, but HTTPError is a subclass of URLError, so the HTTPError handler is no longer reached.

Instead, you get an AttributeError on e.reason, because HTTPError does not have a reason field. (This itself is a Python bug: http://bugs.python.org/issue13211)

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

Reviewed: https://review.openstack.org/1914
Committed: http://github.com/openstack/nova/commit/2f70137a1b4951be56ebeb25a186e53551306faa
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 2f70137a1b4951be56ebeb25a186e53551306faa
Author: Ewan Mellor <email address hidden>
Date: Sun Nov 27 20:12:42 2011 -0800

    Bug #897054: stack crashes with AttributeError on e.reason if the server returns an error

    Swap the URLError and HTTPError exception handlers. HTTPError is a subclass
    of URLError, so the HTTPError handler wasn't being reached.

    Change-Id: Iec86d2b345dbd37858af888bbd54a74884025eda

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-2
status: Fix Committed → Fix Released
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.