Overzealous validation of images in empty ResourceGroups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Steven Hardy | ||
Juno |
Fix Released
|
Undecided
|
Unassigned | ||
tripleo |
Fix Released
|
High
|
Tomas Sedovic |
Bug Description
To reproduce this, save both attached templates and do `heat stack-create -f template.yaml`.
It will error with:
ERROR: Failed to validate: Property error : myserv: image Error validating value u'unknown-image': The Image (unknown-image) could not be found.
Prior to this commit, these templates would create a stack:
https:/
This is a bit of a special case, because the validation runs on resources that will not be created at the time of stack-creation (we're creating 0 servers so it doesn't matter that the image isn't there).
This is breaking TripleO, but I am sympathetic towards both ways to think about this (validate everything to catch things quickly vs. don't validate anything that isn't actually going to be created).
I think is conceptually similar to conditionals (if/when we end up having them) so the solution there and here should be the same whatever it ends up being.
Changed in tripleo: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Tomas Sedovic (tsedovic) |
Changed in heat: | |
milestone: | kilo-1 → kilo-2 |
tags: | added: juno-backport-potential |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in tripleo: | |
status: | Confirmed → Fix Committed |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | kilo-2 → 2015.1.0 |
tags: |
added: in-stable-juno removed: juno-backport-potential |
The reason is the glance.image custom constraint here:
https:/ /github. com/openstack/ heat/blob/ master/ heat/engine/ resources/ server. py#L107
Probably the easiest quick fix is to skip the validation when count=0 - the behaviour introduced in the commit referenced as breaking this above is still desirable, as we'd want to fail fast on update in the event count > 0 is specified with some invalid data in the nested template.