Unexpected traceback during creation

Bug #1363093 reported by Sergey Kraynev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Sergey Kraynev

Bug Description

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.

Changed in heat:
assignee: nobody → Sergey Kraynev (skraynev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/117793

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/117793
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=6226326cade9780f893ffe3766800f4a5e017171
Submitter: Jenkins
Branch: master

commit 6226326cade9780f893ffe3766800f4a5e017171
Author: Sergey Kraynev <email address hidden>
Date: Fri Aug 29 09:57:44 2014 -0400

    Do template validation during creation

    During create we should handle exceptions same as for template
    validation. This change will allow correct display of mistakes in a
    template after a failed create attempt.

    Change-Id: I55c5197533a25c93c5c61953a05c2276ada52fc1
    Closes-Bug: #1363093

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.