heat validates successfully empty template files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Low
|
Sergey Kraynev |
Bug Description
From the documentation in http://
"
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-
Changed in heat: | |
assignee: | nobody → Sergey Kraynev (skraynev) |
Changed in heat: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | juno-1 → 2014.2 |
I think there are a number of things like this that might best be handed with a system of warnings, rather than failures. It is valid YAML, and just because it has no parameters, resources, or outputs, doesn't mean it is "invalid". Heat is just following orders. It is rather obvious when one looks at the resulting stack that it is not really useful.