Bug 1433905 - Heat should specify precisely where the parse error occurred
Summary: Heat should specify precisely where the parse error occurred
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 12.0 (Pike)
Assignee: Rabi Mishra
QA Contact: Ronnie Rasouli
Depends On:
TreeView+ depends on / blocked
Reported: 2017-03-20 11:04 UTC by Udi Kalifon
Modified: 2018-02-05 19:04 UTC (History)
9 users (show)

Fixed In Version: openstack-heat-9.0.0-0.20170706121153.bdfe16c.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-13 21:18:38 UTC
Target Upstream Version:

Attachments (Terms of Use)
customized keystone role and environment files (3.86 KB, application/x-gzip)
2017-03-20 11:04 UTC, Udi Kalifon
no flags Details
error message (4.15 KB, text/plain)
2017-03-20 11:06 UTC, Udi Kalifon
no flags Details

System ID Private Priority Status Summary Last Updated
Launchpad 1684354 0 None None None 2017-04-20 04:48:20 UTC
Launchpad 1686360 0 None None None 2017-04-26 20:31:59 UTC
OpenStack gerrit 458499 0 None None None 2017-04-20 14:13:19 UTC
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description Udi Kalifon 2017-03-20 11:04:23 UTC
Created attachment 1264738 [details]
customized keystone role and environment files

Description of problem:
I'm trying to deploy in a virtual environment with OSP10. I am using the default templates with a customized roles_data.yaml (I have a separated keystone role there and a serviceapi role) and network isolation.

Deployment fails with a very long error message (see attached text file). It says "Error parsing template" but it doesn't say exactly where and I am stuck with it.

The deployment command that was used is:
openstack overcloud deploy --templates -r roles_data.yaml --neutron-network-type vxlan --neutron-tunnel-types vxlan,gre --ntp-server clock.redhat.com -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e network-environment.yaml

See also attached tgz file with the roles data and network environment files.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Use the attached tgz which contains the network environment and custom roles_data.yaml.
2. Run the deployment command from above.

Actual results:
Error parsing template

Expected results:
The error is not specific enough. I can't guess where the problem is and I'm stuck the whole day on it.

Comment 1 Udi Kalifon 2017-03-20 11:06:01 UTC
Created attachment 1264739 [details]
error message

Comment 2 Zane Bitter 2017-03-20 17:57:35 UTC
It looks like when a validation error occurs in a nested stack we're not including information about which nested stack it's in.

Other than that, the message is pretty clear:

 ERROR: Failed to validate: Failed to validate: resources[0]: Error parsing template: while parsing a block collection
  in "<unicode string>", line 83, column 13:
expected <block end>, but found '?'
  in "<unicode string>", line 102, column 13:

It's at line 102, column 13 of some template, which is resource "0" in its parent stack (so it's likely a member of a ResourceGroup). We don't know which template, but we do know that line says "members:", and also what line 83 says.

Creating the overcloud normally works, so it's likely that one of the customised templates is the culprit. In this case it's serviceapi.yaml - there should be an extra two spaces at the beginning of line 102.

Comment 6 Udi Kalifon 2017-11-19 10:57:06 UTC
Verified in openstack-heat-engine-9.0.1-0.20171023060845.be1e2e9.el7ost.noarch

The error message now contains the file name where the parse error occurred:
Error parsing template while parsing a block collection\n  in "<unicode string>", line 71, column 13:

Comment 9 errata-xmlrpc 2017-12-13 21:18:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.