Nested stacks cannot process non-trivial data structures in parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Steven Hardy | ||
Juno |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Nested stacks currently (Heat Template Version 2014-10-16) support the following data types for nested stacks' parameters (or generally stack parameters for that matter):
string, number, boolean, comma_delimited
The latter two look like they could theoretically be used for more complex data structures, such as:
* The `networks` attribute of OS::Nova::Server (a list of maps)
* The `allocation_pools` attribute of OS::Neutron::Subnet (a list of maps)
Hence I tried creating a stack that invoked the attached nested stack as follows:
network:
type: networks-
properties:
cidr: 10.10.10.0/24
allocatio
- {start: 10.10.10.10, end: 10.10.10.150}
name:
list_join:
- '_'
- [ heat, { get_param: 'OS::stack_name' } ]
This resulted in a CREATE_FAILED status with the following stack_status_
Resource CREATE failed: StackValidation
error : subnet: allocation_pools Property error :
allocation_pools: 0 ".member.
not a map
Note, that it seems to have passed template validation (if the parameter type for the allocation_pools parameter in networks-
Another observation: The problem seems to lie with parameters actually passed to the template. If the parameter is not being passed, causing the default value for allocation_pools in networks-
description: | updated |
description: | updated |
description: | updated |
Changed in heat: | |
status: | Triaged → Confirmed |
Changed in heat: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | kilo-3 → 2015.1.0 |
This is similar to an issue observed by dprince working on tripleo- heat-templates, where we want to pass a server list from a ResourceGroup into a nested stack containing a SoftwareDeployments resource.
I'm looking into a way to fix that, so I'll take this & see if a common solution is possible.