Heat return huge traceback during creation but works correct for template validation in the same case.
Used template:
heat_template_version: 2013-05-23
resources:
port1:
Type: OS::Neutron::Port
properties:
network: private
Output for validation looks like:
skr@ubuntu:~$ heat template-validate -f test2.yaml
ERROR: u'"Type" is not a valid keyword inside a resource definition'
But during creation we will get:
ERROR: u'u\'"Type" is not a valid keyword inside a resource definition\'\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 "/opt/stack/heat/heat/engine/service.py", line 64, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n File "/opt/stack/heat/heat/engine/service.py", line 587, in create_stack\n owner_id)\n\n File "/opt/stack/heat/heat/engine/service.py", line 508, in _parse_template_and_validate_stack\n self._validate_new_stack(cnxt, stack_name, tmpl)\n\n File "/opt/stack/heat/heat/engine/service.py", line 489, in _validate_new_stack\n parsed_template.validate()\n\n File "/opt/stack/heat/heat/engine/template.py", line 222, in validate\n for res in self[self.RESOURCES].values():\n\n File "/opt/stack/heat/heat/engine/hot/template.py", line 83, in __getitem__\n return self._translate_resources(the_section)\n\n File "/opt/stack/heat/heat/engine/hot/template.py", line 119, in _translate_resources\n _(\'"%s" is not a valid keyword \'\n\n File "/opt/stack/heat/heat/engine/hot/template.py", line 99, in _translate\n raise KeyError(err_msg % value)\n\nKeyError: u\'"Type" is not a valid keyword inside a resource definition\'\n'
I think that it should be handled like for validation process and same validation should be executed during creation.
Fix proposed to branch: master /review. openstack. org/117793
Review: https:/