MIssing flavor causes backtrace

Bug #1129388 reported by Ian Main
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Ian Main
Grizzly
Fix Released
High
Ian Main

Bug Description

There is no error handling in place for a missing 'flavor id'. If a flavor is specified which is not in openstack, a flavor_id is used before assignment error occurs.

Revision history for this message
Ian Main (imain) wrote :
Changed in heat:
status: New → In Progress
Revision history for this message
Ian Main (imain) wrote :

Backtrace:

2013-02-14 12:53:55 ERROR [heat.engine.resource] create Instance "WikiDatabase"
Traceback (most recent call last):
  File "/home/imain/src/heat/heat/engine/resource.py", line 255, in create
    self.handle_create()
  File "/home/imain/src/heat/heat/engine/resources/instance.py", line 265, in handle_create
    flavor=flavor_id,
UnboundLocalError: local variable 'flavor_id' referenced before assignment

Steven Dake (sdake)
Changed in heat:
milestone: none → grizzly-3
assignee: nobody → Ian Main (imain)
importance: Undecided → High
Revision history for this message
Ian Main (imain) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/22003
Committed: http://github.com/openstack/heat/commit/d0dde5b4a9d7ba4efe608e45f66e27aa98ed6ec3
Submitter: Jenkins
Branch: master

commit d0dde5b4a9d7ba4efe608e45f66e27aa98ed6ec3
Author: Ian Main <email address hidden>
Date: Thu Feb 14 15:04:30 2013 -0800

    Throw a proper error if the flavor is missing.

    I ran into a bug which caused a bt when the flavor is missing on the
    targetted system. This patch makes it throw a proper exception and a
    useful error message.

    Fixes: bug #1129388
    Change-Id: I545fce32732522053e2a4a113a02883a89045910
    Signed-off-by: Ian Main <email address hidden>

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: grizzly-rc1 → 2013.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.