Invalid parameter defaults can't be overriden
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Steven Hardy |
Bug Description
If you have a template with a parameter constraint (particularly when using custom constraints), it's possible that the default in the template may not match your environment, but that when resolved at runtime the value provided in the environment/
However heat fails the validation step, so you can't override the invalid parameter default with a valid value:
$ nova keypair-list
+------
| Name | Fingerprint |
+------
| stack_key | 46:de:3d:
+------
$ cat param_ex.yaml
heat_template_
parameters:
key_name:
type: string
constraints:
- custom_constraint: nova.keypair
default: noexist
$ heat stack-create param_ex -f param_ex.yaml -P "key_name=
ERROR: Invalid default noexist (Error validating value u'noexist': The Key (noexist) could not be found.)
tags: | added: tripleo |
Changed in heat: | |
assignee: | nobody → Steven Hardy (shardy) |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | kilo-rc1 → 2015.1.0 |
I'm a bit puzzled by that one. Why having a default if it's not valid in all your environments? I presume you can reproduce this problem easily by having an integer parameter with a default value of 'foo'.
We may be able to fix, but I'm a bit worried that we'll end up with an inconsistent template in Heat, where a future update will fail in weird way. It's certainly something to test.