[Rdo-list] [heat]error parsing template file

Steven Hardy shardy at redhat.com
Wed May 13 08:16:41 UTC 2015


On Wed, May 13, 2015 at 09:52:30AM +0200, ICHIBA Sara wrote:
>    Found some spacing errors and corrected them. Now I have other errors
>    popping up when i execute the heat create-stack command:
> 
>    Just so you know. I'm newbie to heat , and I'm not that good with coding
>    but I'm trying.
>    [root at localhost ~(keystone_admin)]# heat stack-create lb_autoscale -f
>    simple.yaml -e environment.yaml
>    ERROR: 'unicode' object has no attribute 'get'
>    Traceback (most recent call last):
> 
>    A  File
>    "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line
>    134, in _dispatch_and_reply
>    A A A  incoming.message))
> 
>    A  File
>    "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line
>    177, in _dispatch
>    A A A  return self._do_dispatch(endpoint, method, ctxt, args)
> 
>    A  File
>    "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line
>    123, in _do_dispatch
>    A A A  result = getattr(endpoint, method)(ctxt, **new_args)
> 
>    A  File "/usr/lib/python2.7/site-packages/heat/engine/service.py", line
>    69, in wrapped
>    A A A  return func(self, ctx, *args, **kwargs)
> 
>    A  File "/usr/lib/python2.7/site-packages/heat/engine/service.py", line
>    645, in create_stack
>    A A A  owner_id)
> 
>    A  File "/usr/lib/python2.7/site-packages/heat/engine/service.py", line
>    568, in _parse_template_and_validate_stack
>    A A A  stack.validate()
> 
>    A  File "/usr/lib/python2.7/site-packages/heat/engine/stack.py", line 446,
>    in validate
>    A A A  parameter_groups.validate()
> 
>    A  File
>    "/usr/lib/python2.7/site-packages/heat/engine/parameter_groups.py", line
>    49, in validate
>    A A A  parameters = group.get(PARAMETERS)
> 
>    AttributeError: 'unicode' object has no attribute 'get'

That error isn't super-helpful (we should look at improving it, I'll raise
a bug), but AFAICS the problem is you're specifying the parameters inline
in the parameter_groups definition:

http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#parameter-groups-section

Here's how it should look:

https://github.com/openstack/heat-templates/blob/master/openshift-origin/centos65/highly-available/oso_ha.yaml#L6

Unless you really need them, I'd reccomend just not using parameter groups
for now, and getting things working with just the "parameters" section
first.

HTH,

Steve




More information about the rdo-list mailing list