Uninformative yaml error during parsing template

Bug #1496361 reported by Peter Razumovsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Peter Razumovsky
python-heatclient
Fix Committed
Medium
Peter Razumovsky

Bug Description

Step
1 ssh to one of controllers

2 execute: . openrc

3 create stack using aws format template:
heat stack-create --template-url https://github.com/openstack/heat-templates/blob/master/cfn/F17/Neutron_floating.template -P internal_network=<id> -P external_network=<id> -P internal_subnet=<id>

Where <id> your existing networks

Result:
Error parsing template https://github.com/openstack/heat-templates/blob/master/cfn/F17/Neutron_floating.template mapping values are not allowed in this context
  in "<unicode string>", line 6, column 19

But when we change template format ( Raw view on GitHub) command works correctly
( https://raw.githubusercontent.com/openstack/heat-templates/master/cfn/F17/Neutron_floating.template )

We need to provide more recognizable error message or try to say, that template is wrong due to ...

Changed in heat:
assignee: nobody → Peter Razumovsky (prazumovsky)
Changed in heat:
status: New → Triaged
importance: Undecided → Medium
milestone: none → next
Changed in python-heatclient:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Peter Razumovsky (prazumovsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

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

Changed in python-heatclient:
status: Triaged → In Progress
Changed in heat:
milestone: next → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/232565
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=54a1715e348720ab31b5d2e38035bf429471cdbe
Submitter: Jenkins
Branch: master

commit 54a1715e348720ab31b5d2e38035bf429471cdbe
Author: Peter Razumovsky <email address hidden>
Date: Thu Oct 8 17:22:59 2015 +0300

    Add option for detailed template error

    Add option detailed_template_error for informative
    error during template and environment parsing.

    yaml.SafeLoader returns error with template snippet where
    error has been occurred instead of CSafeLoader. But
    CSafeLoader is faster. So, if user wants to get more
    informative error, use slower but more detailed SafeLoader
    for yaml loading.

    Change-Id: Ied0a573a00eb5f564dea0c636da1301de5de9ea7
    Closes-bug: #1496361

Changed in python-heatclient:
status: In Progress → Fix Committed
tags: added: liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/235449

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (stable/liberty)

Related fix proposed to branch: stable/liberty
Review: https://review.openstack.org/235450

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/235451

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

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

commit b41739a63ed915a763d9102865056ee540477917
Author: Peter Razumovsky <email address hidden>
Date: Thu Oct 15 18:43:27 2015 +0300

    Add more informative error during parsing

    If there is some error during parsing template or
    env file, CSafeLoader errors doesn't contains snippet
    from template. So, we need to use SafeLoader for more
    informative error with snippet from parsed template.

    Change-Id: I79039164533c032db66c933c4e8882b8942961eb
    Related-bug: #1496361

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/235450
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=764ec45bea76ce1983dc2eb4dd3a3c306b58de8b
Submitter: Jenkins
Branch: stable/liberty

commit 764ec45bea76ce1983dc2eb4dd3a3c306b58de8b
Author: Peter Razumovsky <email address hidden>
Date: Thu Oct 15 18:43:27 2015 +0300

    Add more informative error during parsing

    If there is some error during parsing template or
    env file, CSafeLoader errors doesn't contains snippet
    from template. So, we need to use SafeLoader for more
    informative error with snippet from parsed template.

    Change-Id: I79039164533c032db66c933c4e8882b8942961eb
    Related-bug: #1496361
    (cherry picked from commit b41739a63ed915a763d9102865056ee540477917)

tags: added: in-stable-liberty
tags: removed: liberty-backport-potential
Changed in heat:
status: Triaged → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (stable/liberty)

Reviewed: https://review.openstack.org/235451
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=d812114ec08b70e840a7de5dd5116759a1dce41e
Submitter: Jenkins
Branch: stable/liberty

commit d812114ec08b70e840a7de5dd5116759a1dce41e
Author: Peter Razumovsky <email address hidden>
Date: Thu Oct 8 17:22:59 2015 +0300

    Add option for detailed template error

    NOTE: The title of original patch is incorrect, because
    patch adds additional yaml parsing with detailed error,
    but there's no adding new option for this.

    If there is some error during parsing template or
    env file, CSafeLoader errors doesn't contains snippet
    from template. So, we need to use SafeLoader for more
    informative error with snippet from parsed template.

    Change-Id: Ied0a573a00eb5f564dea0c636da1301de5de9ea7
    Closes-bug: #1496361
    (cherry picked from commit 54a1715e348720ab31b5d2e38035bf429471cdbe)

Changed in heat:
status: Fix Committed → Fix Released
Changed in python-heatclient:
milestone: none → 1.3.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-heatclient 0.8.1

This issue was fixed in the openstack/python-heatclient 0.8.1 release.

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.