When I try to preview template with autoscaling group I get error:
2014-05-29 07:16:05.491 ERROR heat.openstack.common.rpc.amqp [req-019ea9a1-8c19-41a5-8780-74204434fbea demo demo] Exception during message handling
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp Traceback (most recent call last):
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/openstack/common/rpc/amqp.py", line 462, in _process_data
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp **args)
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/openstack/common/rpc/dispatcher.py", line 172, in dispatch
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs)
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/service.py", line 62, in wrapped
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp return func(self, ctx, *args, **kwargs)
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/service.py", line 505, in preview_stack
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp return api.format_stack_preview(stack)
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/api.py", line 147, in format_stack_preview
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp fmt_resources = map(format_resource, stack.preview_resources())
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/parser.py", line 452, in preview_resources
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp for resource in self.resources.itervalues()]
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/stack_resource.py", line 102, in preview
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp template = parser.Template(self.child_template())
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/resources/autoscaling.py", line 767, in child_template
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp return self._create_template(num_instances)
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/resources/autoscaling.py", line 313, in _create_template
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp instance_definition = self._get_instance_definition()
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp File "/opt/stack/heat/heat/engine/resources/autoscaling.py", line 296, in _get_instance_definition
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp instance_definition['Properties']['Tags'] = self._tags()
2014-05-29 07:16:05.491 TRACE heat.openstack.common.rpc.amqp KeyError: 'Properties'
It happens, because self.stack.resource_by_refid return incorrect resource.
During preview all ref_id is None, so we can get random resource. it should be fixed.
Fix proposed to branch: master /review. openstack. org/97543
Review: https:/