event-list fails for Autoscaling example template

Bug #1089338 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steven Hardy
Grizzly
Fix Released
High
Steven Hardy

Bug Description

As observed/reported by ppetit, there is a problem with the event-list API action for stacks using Autoscaling groups.

Steps to reproduce:

heat-cfn create autoscale2 --template-file=templates/AutoScalingMultiAZSample.template --parameters="InstanceType=m1.xlarge;DBUsername=${USER};DBPassword=verybadpass;KeyName=${USER}_key"

<wait for stack to create>

 heat-cfn event-list autoscale2
ERROR:Failed to event-list. Got error:
ERROR:Internal Server error: <ErrorResponse><Error><Message>The request processing has failed due to an internal error:u'WebServerGroup-0'</Message><Code>InternalFailure</Code><Type>Server</Type></Error></ErrorResponse>

engine log, looks like a resource name lookup issue (something needs physical_resource_name()?)

2012-12-12 11:33:02 ERROR [heat.openstack.common.rpc.amqp] Exception during message handling
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/heat-2013.1-py2.7.egg/heat/openstack/common/rpc/amqp.py", line 276, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)
  File "/usr/lib/python2.7/site-packages/heat-2013.1-py2.7.egg/heat/openstack/common/rpc/dispatcher.py", line 147, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)
  File "/usr/lib/python2.7/site-packages/heat-2013.1-py2.7.egg/heat/engine/service.py", line 44, in wrapped
    return func(self, ctx, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/heat-2013.1-py2.7.egg/heat/engine/service.py", line 344, in list_events
    output = [api.format_event(Event.load(context, e.id)) for e in events]
  File "/usr/lib/python2.7/site-packages/heat-2013.1-py2.7.egg/heat/engine/event.py", line 57, in load
    resource = stack[ev.logical_resource_id]
  File "/usr/lib/python2.7/site-packages/heat-2013.1-py2.7.egg/heat/engine/parser.py", line 166, in __getitem__
    return self.resources[key]
KeyError: u'WebServerGroup-0'

Steven Hardy (shardy)
Changed in heat:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steven Hardy (shardy)
milestone: none → grizzly-2
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/17943

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/17943
Committed: http://github.com/openstack/heat/commit/355f03eec21883935f47232b3e00a5cf1de1680b
Submitter: Jenkins
Branch: master

commit 355f03eec21883935f47232b3e00a5cf1de1680b
Author: Steven Hardy <email address hidden>
Date: Wed Dec 12 14:57:11 2012 +0000

    resource state_set, abstract update/store logic

    Abstract the DB update/store logic so the state_set function
    can be more cleanly overridden for AutoScalingGroupInstance

    ref bug 1089338

    Change-Id: I02dc52068feaeed8ec8210269d9abb7b124f0a19
    Signed-off-by: Steven Hardy <email address hidden>

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/17944
Committed: http://github.com/openstack/heat/commit/772818102cc815186ed44bfb2f78ca6c36266fbf
Submitter: Jenkins
Branch: master

commit 772818102cc815186ed44bfb2f78ca6c36266fbf
Author: Steven Hardy <email address hidden>
Date: Wed Dec 12 14:59:02 2012 +0000

    Override events for AutoScalingGroup instances

    Override state-transition events by subclassing the Instance
    resource to AutoScalingGroupInstance, this avoids problems where
    events can't lookup the resource via parser.Stack (since these
    resources aren't "real" resources defined in the template)

    fixes bug 1089338

    Change-Id: Ia064cd067eefdaa5ca81b0cb822ce2fa443bac85
    Signed-off-by: Steven Hardy <email address hidden>

Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: grizzly-2 → 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.