Ask Your Question
0

Heat templates ERROR: Failed to validate

asked 2018-03-28 08:38:07 -0500

bercikos gravatar image

When i run this command:

openstack stack create --dry-run -t heat.yaml -e heat.env test_heat --insecure

I am facing this problem:

ERROR: Failed to validate: Failed to validate: resources[0]: 'str' object has no attribute 'get'

What can cause this error? Or how can i debug in which line of heat templates the error occures?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-04-04 09:15:14 -0500

zaneb gravatar image

The error message is telling you that the error is in resources[0], so it appears you have a resource named 0 that is or contains a string where a dict is expected.

I'm guessing this is inside a ResourceGroup, since people don't tend to name their resources "0", and since there are two "Failed to validate:" messages in the error, suggesting that this came from a nested stack.

If you posted the template and the version of Heat you're using, this would be a lot easier :)

edit flag offensive delete link more

Comments

Unfortunatelly I can't post this because it's corporate internal code.

Could you tell me is there a way to see structure of some parameter? Like for example I have got guess which parameter has got bad structure, but I would like to see if my guess is correct.

bercikos gravatar imagebercikos ( 2018-04-05 05:34:01 -0500 )edit

I would create a stack containing no resources (to eliminate the error) and an output whose value is just get_param on the parameter you're interested in. Then show the stack outputs to see (Maybe compare to one formatted the way you expect, to eliminate the output formatting as a factor.)

zaneb gravatar imagezaneb ( 2018-04-30 09:37:48 -0500 )edit

This question: https://ask.openstack.org/en/question... suggests that the error is coming from the old property translation code, so it's probably due to passing a string to a property that expects a dict.

zaneb gravatar imagezaneb ( 2018-04-30 09:42:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-03-28 08:38:07 -0500

Seen: 363 times

Last updated: Apr 04 '18