OpenStack Compute (Nova)

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

Reported by Ewan Mellor on 2011-11-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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)

Ewan Mellor (ewanmellor) wrote :
Changed in nova:
status: New → In Progress
assignee: nobody → Ewan Mellor (ewanmellor)

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