[heat] certain template errors display a long stack trace in the red error popup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Undecided
|
Miguel Grinberg |
Bug Description
I have found that certain types of template errors are not caught in the first validation pass, and instead fail in the second phase, when all the parameters are submitted.
For example, adding an invalid property to an output does this. Here is an example (only showing the "outputs" section):
outputs:
mysql_
description: Name of the MySQL instance
value: { get_attr: [mysql_instance, name] }
mysql_
description: The IP address of the MySQL instance
value: { get_attr: [mysql_instance, first_address] }
mysql_password:
description: The MySQL root password
value: { get_attr: [mysql_password, value] }
hidden: true
The "hidden" parameter is invalid for an output, but the initial template validation does not find an error (likely a Heat problem). When the template is finally submitted a stack trace appears in the red popup error (see attached screenshot).
Changed in horizon: | |
assignee: | nobody → Miguel Grinberg (miguelgrinberg) |
Changed in heat: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | kilo-1 → 2015.1.0 |
Moved bug to heat project, this message comes from heat-engine, same happens when using command line client:
$ heat stack-create test -f bug.yaml '\nTraceback (most recent call last):\n\n File "/usr/local/ lib/python2. 7/dist- packages/ oslo/messaging/ rpc/dispatcher. py", line 134, in _dispatch_ and_reply\ n incoming. message) )\n\n File "/usr/local/ lib/python2. 7/dist- packages/ oslo/messaging/ rpc/dispatcher. py", line 177, in _dispatch\n return self._do_ dispatch( endpoint, method, ctxt, args)\n\n File "/usr/local/ lib/python2. 7/dist- packages/ oslo/messaging/ rpc/dispatcher. py", line 123, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n\n File "/usr/local/ lib/python2. 7/dist- packages/ osprofiler/ profiler. py", line 105, in wrapper\n return f(*args, **kwargs)\n\n File "/opt/stack/ heat/heat/ engine/ service. py", line 72, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n File "/opt/stack/ heat/heat/ engine/ service. py", line 678, in create_stack\n user_creds_id)\n\n File "/opt/stack/ heat/heat/ engine/ service. py", line 593, in _parse_ template_ and_validate_ stack\n **common_ params) \n\n File "/opt/stack/ heat/heat/ engine/ stack.py" , line 137, in __init__\n self.outputs = self.resolve_ static_ data(self. t[self. t.OUTPUTS] )\n\n File "/opt/stack/ heat/heat/ engine/ hot/template. py", line 108, in __getitem__\n return self._translate _outputs( the_section) \n\n File "/opt/stack/ heat/heat/ engine/ hot/template. py", line 172, in _translate_ outputs\ n _(\'"%s" is not a valid \'\n\n File "/opt/stack/ heat/heat/ engine/ hot/template. py", line 118, in _translate\n raise KeyError(err_msg % value)\n\nKeyError: u\'"hidden" is not a valid keyword inside an output definition\'\n'
ERROR: u'u\'"hidden" is not a valid keyword inside an output definition\