It is a bug, but it isn't really all that important.
Excerpts from Amit Ugol's message of 2014-02-11 05:38:05 UTC:
> I opened this bug thinking that empty templates should not be validated as they create 'bad' stacks but then I saw the validation thing (as posted) and added that to the description as well. I know empty templates are YAML valid but IMO that does not mean that they are 'heat valid' as in heat will not be able to do anything with them, rendering them useless.
> If needs be I can just open a different one for 'validation only'.
>
> --
> You received this bug notification because you are subscribed to heat.
> https://bugs.launchpad.net/bugs/1278090
>
> Title:
> heat validates successfully empty template files
>
> Status in Orchestration API (Heat):
> Triaged
>
> Bug description:
> From the documentation in http://docs.openstack.org/user-guide/content
> /heat-stack-create.html:
>
> "
> You can also use the stack-create command to validate a template file without creating a stack from it.
> To do so, run the following command:
> $ heat stack-create mystack --template-file=/PATH_TO_HEAT_TEMPLATES/WordPress_Single_Instance.template
> "
>
> However trying to validate empty files or even null, will return a
> success:
>
>
> # heat stack-create test234 --template-file=/dev/null
> +--------------------------------------+------------+-----------------+----------------------+
> | id | stack_name | stack_status | creation_time |
> +--------------------------------------+------------+-----------------+----------------------+
> | f9e37e85-9c4b-4422-943c-a593c75d677f | test123 | CREATE_COMPLETE | 2014-02-09T13:38:42Z |
>
> # tail /var/log/heat/engine.log
> 2014-02-09 15:54:26.364 1778 INFO heat.engine.service [req-f9e37e85-9c4b-4422-943c-a593c75d677f ***** *****] template is {u'Parameters': {}, u'Outputs': {}, u'HeatTemplateFormatVersion': u'2012-12-12', u'Mappings': {}, u'Resources': {}}
>
>
> # mysql
> MariaDB [(none)]> use heat
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Database changed
> MariaDB [heat]> select * from stack where name='test123'\G;
> *************************** 1. row ***************************
> id: f9e37e85-9c4b-4422-943c-a593c75d677f
> created_at: 2014-02-09 13:38:42
> updated_at: 2014-02-09 13:38:42
> name: test123
> raw_template_id: 160
> user_creds_id: 160
> username: admin
> owner_id: NULL
> status: COMPLETE
> status_reason: Stack create completed successfully
> parameters: {"parameters": {}, "resource_registry": {"resources": {}}}
> timeout: 60
> tenant: 0e8b6030e87f49be8ae68fc37649a986
> disable_rollback: 1
> action: CREATE
> deleted_at: NULL
> 1 row in set (0.00 sec)
>
>
> Other info:
> # cat /etc/redhat-release
> Fedora release 20 (Heisenbug)
>
> # uname -a
> Linux ***domain*** 3.12.9-301.fc20.x86_64 #1 SMP Wed Jan 29 15:56:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>
> # heat --version
> 0.2.6
>
> # rpm -qa | grep heat
> openstack-heat-engine-2014.1-0.4.b1.fc21.noarch
> python-heatclient-0.2.6-3.fc21.noarch
> openstack-heat-common-2014.1-0.4.b1.fc21.noarch
> openstack-heat-api-2014.1-0.4.b1.fc21.noarch
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/heat/+bug/1278090/+subscriptions
It is a bug, but it isn't really all that important.
Excerpts from Amit Ugol's message of 2014-02-11 05:38:05 UTC: /bugs.launchpad .net/bugs/ 1278090 docs.openstack. org/user- guide/content create. html: file=/PATH_ TO_HEAT_ TEMPLATES/ WordPress_ Single_ Instance. template file=/dev/ null ------- ------- ------- ------- ----+-- ------- ---+--- ------- ------- +------ ------- ------- --+ ------- ------- ------- ------- ----+-- ------- ---+--- ------- ------- +------ ------- ------- --+ 9c4b-4422- 943c-a593c75d67 7f | test123 | CREATE_COMPLETE | 2014-02- 09T13:38: 42Z | heat/engine. log 9c4b-4422- 943c-a593c75d67 7f ***** *****] template is {u'Parameters': {}, u'Outputs': {}, u'HeatTemplateF ormatVersion' : u'2012-12-12', u'Mappings': {}, u'Resources': {}} ******* ******* ****** 1. row ******* ******* ******* ****** 9c4b-4422- 943c-a593c75d67 7f registry" : {"resources": {}}} e8ae68fc37649a9 86 301.fc20. x86_64 #1 SMP Wed Jan 29 15:56:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux heat-engine- 2014.1- 0.4.b1. fc21.noarch heatclient- 0.2.6-3. fc21.noarch heat-common- 2014.1- 0.4.b1. fc21.noarch heat-api- 2014.1- 0.4.b1. fc21.noarch /bugs.launchpad .net/heat/ +bug/1278090/ +subscriptions
> I opened this bug thinking that empty templates should not be validated as they create 'bad' stacks but then I saw the validation thing (as posted) and added that to the description as well. I know empty templates are YAML valid but IMO that does not mean that they are 'heat valid' as in heat will not be able to do anything with them, rendering them useless.
> If needs be I can just open a different one for 'validation only'.
>
> --
> You received this bug notification because you are subscribed to heat.
> https:/
>
> Title:
> heat validates successfully empty template files
>
> Status in Orchestration API (Heat):
> Triaged
>
> Bug description:
> From the documentation in http://
> /heat-stack-
>
> "
> You can also use the stack-create command to validate a template file without creating a stack from it.
> To do so, run the following command:
> $ heat stack-create mystack --template-
> "
>
> However trying to validate empty files or even null, will return a
> success:
>
>
> # heat stack-create test234 --template-
> +------
> | id | stack_name | stack_status | creation_time |
> +------
> | f9e37e85-
>
> # tail /var/log/
> 2014-02-09 15:54:26.364 1778 INFO heat.engine.service [req-f9e37e85-
>
>
> # mysql
> MariaDB [(none)]> use heat
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Database changed
> MariaDB [heat]> select * from stack where name='test123'\G;
> *******
> id: f9e37e85-
> created_at: 2014-02-09 13:38:42
> updated_at: 2014-02-09 13:38:42
> name: test123
> raw_template_id: 160
> user_creds_id: 160
> username: admin
> owner_id: NULL
> status: COMPLETE
> status_reason: Stack create completed successfully
> parameters: {"parameters": {}, "resource_
> timeout: 60
> tenant: 0e8b6030e87f49b
> disable_rollback: 1
> action: CREATE
> deleted_at: NULL
> 1 row in set (0.00 sec)
>
>
> Other info:
> # cat /etc/redhat-release
> Fedora release 20 (Heisenbug)
>
> # uname -a
> Linux ***domain*** 3.12.9-
>
> # heat --version
> 0.2.6
>
> # rpm -qa | grep heat
> openstack-
> python-
> openstack-
> openstack-
>
> To manage notifications about this bug go to:
> https:/