[SRU] Validating a stack fails as one nested stack can't find an id from another
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Invalid
|
Undecided
|
Unassigned | ||
Liberty |
Fix Released
|
High
|
Felipe Reyes | ||
heat (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Wily |
Fix Released
|
High
|
Felipe Reyes |
Bug Description
[Impact]
when a user tries to create nested templates, the network id cannot be retrieved raising an error, this works fine in Kilo.
[Test Case]
* Deploy openstack with heat enabled
$ bzr branch lp:openstack-charm-testing
$ cd openstack-
$ juju deployer -c default.yaml -d -v -s 10 wily-liberty
$ juju action do heat/0 domain-setup
$ ./configure
$ cat << EOF > minimal_
heat_template_
description: "Works well in Darmstadt Liberty LAB"
resources:
network:
type: network.yaml
properties:
name:
list_join:
- '_'
- [ heat, { get_param: 'OS::stack_name' } ]
port:
type: OS::Neutron::Port
properties:
network_id: { get_attr: [ network, network ] }
EOF
$ cat << EOF > minimal_
heat_template_
description: "ERROR: Failed to validate: : resources.port: : At least one of the following properties must be specified: network, network_id"
resources:
network:
type: network.yaml
properties:
name:
list_join:
- '_'
- [ heat, { get_param: 'OS::stack_name' } ]
port:
type: port.yaml # Fails with 'Either network or network_id should be specified.'
properties:
network_id: { get_attr: [ network, network ] }
$ cat << EOF > port.yaml
heat_template_
parameters:
network_id:
type: string
resources:
port:
type: OS::Neutron::Port
properties:
network_id: { get_param: network_id }
$ cat << EOF > network.yaml
heat_template_
description: >
Creates a Neutron network/subnet combination, along with a security group
that allows all traffic from the subnet.
parameters:
name:
description: The name for the created network.
type: string
resources:
network:
type: OS::Neutron::Net
properties:
name: { get_param: name }
outputs:
network:
description: The neutron network created.
value: { get_resource: network }
$ source novarc
$ heat stack-create -f minimal_
$ heat stack-create -f minimal_
Expected:
The nested port is created
Actual result:
Traceback (most recent call last):
File "/usr/bin/heat", line 10, in <module>
sys.
File "/usr/lib/
HeatShell(
File "/usr/lib/
args.
File "/usr/lib/
hc.
File "/usr/lib/
data=kwargs, headers=headers)
File "/usr/lib/
return self.request(url, 'POST', **kwargs)
File "/usr/lib/
raise exc.from_
heatclient.
[Regression Potential]
* This patch was tested in a production environment and also it was already merged in the Liberty stable branch https:/
[Other Info]
* Upstream bug 1518676
description: | updated |
Changed in cloud-archive: | |
status: | New → Invalid |
Changed in heat (Ubuntu Wily): | |
assignee: | nobody → Felipe Reyes (freyes) |
Xenial (mitaka) already contains the fix, it's just needed in Liberty