ResourceFailure exception is created incorrectly

Bug #1210681 reported by Ben Nemec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Ben Nemec

Bug Description

I was trying to set up a Heat DevStack install and the stack creation failed. Instead of an error explaining why it failed, I got the message "Resource create failed: TypeError: __init__() takes at least 3 arguments (2 given)".

Looking through the logs, I found a stack trace explaining a bit more:
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource Traceback (most recent call last):
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 369, in _do_action
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource while not check(handle_data):
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/instance.py", line 308, in check_create_complete
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource return self._check_active(cookie)
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/instance.py", line 330, in _check_active
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource raise exception.ResourceFailure(exc)
2013-08-09 18:11:33.420 5041 TRACE heat.engine.resource TypeError: __init__() takes at least 3 arguments (2 given)

You can see at https://github.com/openstack/heat/blob/master/heat/engine/resources/instance.py#L330 that it does indeed call the constructor with only one parameter (two counting self), and from https://github.com/openstack/heat/blob/master/heat/common/exception.py#L275 you can see that it needs at least one more to work.

Ben Nemec (bnemec)
Changed in heat:
assignee: nobody → Ben Nemec (bnemec)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/41225

Changed in heat:
status: New → In Progress
Changed in heat:
importance: Undecided → High
milestone: none → havana-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/41225
Committed: http://github.com/openstack/heat/commit/8f8c9ab6b7493cb402c16722d5255e792740df0f
Submitter: Jenkins
Branch: master

commit 8f8c9ab6b7493cb402c16722d5255e792740df0f
Author: Ben Nemec <email address hidden>
Date: Fri Aug 9 20:12:23 2013 -0500

    Fix problem creating ResourceFailure

    The ResourceFailure exception is being instantiated improperly in
    a couple of places. This changes fixes the problem and adds tests
    to cover the problem cases.

    Change-Id: I2662a3abde1fd00d275e2190401c20166256cae0
    Closes-Bug: 1210681

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: havana-3 → 2013.2
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.