[Openstack] issue of using ResourceGroup in Heat template
Duan, Li-Gong (Gary, HPServers-Core-OE-PSC)
li-gong.duan at hpe.com
Mon Mar 7 06:11:17 UTC 2016
Hi,
I have 3 Heat templates using ResourceGroup. "rg_b" depends on "rg_a" and when "rg_b" instance is created, it requires the IP address of "rg_a". and I use "rg_a_public_ip: {get_attr: [rg_a, rg_a_public_ip]}" and it returns "null" according to the logs. But weird thing is that I can get the correct rg_a_public_ip in the "outputs" section of a.yaml.
My questions are:
1) Does this behaviors functions as designed?
2) What is the alternative solution for my case if the answer to 1) is yes?
------- a.yaml -------------------
resources:
rg_a:
type: OS::Heat::ResourceGroup
properties:
count: 1
resource_def:
type: b.yaml
properties:
...
rg_b:
type: OS::Heat::ResourceGroup
depends_on:
-rg_a
properties:
count: 2
resource_def:
type: c.yaml
properties:
rg_a_public_ip: {get_attr: [rg_a, rg_a_public_ip]} -------------------- the value is "null"
...
outputs:
rg1_public_ip: {get_attr: [rg_a, rg_a_public_ip]}
--------------------------
------b.yaml --------------------
...
resources:
rg_a:
type: OS::Nova::Server
properties:
...
outputs:
rg_a_public_ip:
value: {get_attr: [rg_a, networks, public, 0]}
--------------------------
---------- c.yaml --------------------
parameters:
rg_a_public_ip:
type: string
description: IP of rg_a
...
resources:
rg_b:
type: OS::Nova::Server
properties:
...
outputs:
...
---------------------------------------
Regards,
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160307/4c92ba71/attachment.html>
More information about the Openstack
mailing list