Hide Forgot
Description of problem: Heat failed to detect an indentation mistake in one of the YAML templates during Openstack installation with OSPD. The YAML template was ceph::profile::params::osd_journal_size: 5120 ceph::profile::params::osd_pool_default_pg_num: 1024 ceph::profile::params::osd_pool_default_pgp_num: 1024 ceph::profile::params::osd_pool_default_size: 3 ceph::profile::params::osd_pool_default_min_size: 2 ceph::profile::params::osds: '/dev/vda': journal: {} '/dev/vdb': journal: {} '/dev/vdc': journal: {} '/dev/vdd': journal: {} '/dev/vde': journal: {} '/dev/vdf': journal: {} '/dev/vdg': journal: {} '/dev/vdh': journal: {} '/dev/vdi': journal: {} '/dev/vdj': journal: {} ceph::profile::params::manage_repo: false ceph::profile::params::authentication_type: cephx ceph_classes: [] ceph_osd_selinux_permissive: true with the line of 'vdb' lacked one space. Heat should've indicated an error in the templates Version-Release number of selected component (if applicable): openstack-heat-api-cfn-6.0.0-11.el7ost.noarch openstack-heat-common-6.0.0-11.el7ost.noarch python-heatclient-1.2.0-1.el7ost.noarch openstack-heat-templates-0-0.3.96a0b0bgit.el7ost.noarch heat-cfntools-1.3.0-2.el7ost.noarch openstack-heat-api-6.0.0-11.el7ost.noarch python-heat-tests-6.0.0-11.el7ost.noarch openstack-heat-engine-6.0.0-11.el7ost.noarch How reproducible: 100% Steps to Reproduce: 1. Deploy a stack with an indentation error in one of the tamplates Actual results: An unrelated error cause the deployment to fail Expected results: The deployment will not start due to an error in the template Additional info:
That... isn't a Heat template file. If it were then Heat would certainly be reporting an error, because PyYAML raises an exception when you try to parse it.
(In reply to Zane Bitter from comment #2) > That... isn't a Heat template file. If it were then Heat would certainly be > reporting an error, because PyYAML raises an exception when you try to parse > it. Shouldn't Heat parse all of the templates in the templates directory?
The heat client will parse heat templates and environment files, but not other included files which just happen to be YAML. I don't have enough context in comment #0 to say whether heat would consider this part of a template. Could you please provide a more complete example?
(In reply to Steve Baker from comment #4) > The heat client will parse heat templates and environment files, but not > other included files which just happen to be YAML. > > I don't have enough context in comment #0 to say whether heat would consider > this part of a template. Could you please provide a more complete example? 1. The entire issue is that error. Can we add this functionality, validation of the YAML files of the entire templates before deployment? 2. What would you like me to add, the heat-engine.log?
I need to see how this yaml is being included in your templates, so I need a more full template example.
This is the existing file, located in /usr/share/openstack-tripleo-heat-templates/puppet/hiera/ceph.yaml after I've edited it
(In reply to Yogev Rabl from comment #3) > Shouldn't Heat parse all of the templates in the templates directory? No, it only parses the ones that it's going to create a stack from. In this case, this isn't even a Heat template, it's a Puppet Hiera file that just happens to be in YAML format (though Heat neither knows nor cares about that). It's Puppet's job to verify that the file is valid; we don't want to enforce that in Heat because we can't possibly know about every configuration file format that users might want to give us. This *would*, however, be a good candidate for a pre-flight validation, since TripleO knows that this is a hiera file. So I'm moving this bug to tripleo-validations and retargeting to OSP11.
I'm currently testing it on https://review.openstack.org/522038
So closing this out because I think this was an issue prior to 10 when you would configure these values in a hieradata file rather than heat templates. Today these values would be in a yaml file which would results in a failure when it gets loaded. If this is still the case in a newer version, please provide specific reproducer details.
And for the record this is because we used to split this hieradata out in to a get_file call in heat yaml. In the future if someone wanted to invest in a typed get_file in heat that could be used address this issue. http://git.openstack.org/cgit/openstack/tripleo-heat-templates/tree/puppet/controller.yaml?h=liberty-eol#n1294