From b2ee58c7f6883011b4ba8b387eedc63d3600aea0 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 3 Feb 2017 17:52:10 -0500 Subject: Don't recalculate EndpointMap to get outputs As of Ocata, whenever Heat needs to get the value of an output from a nested Stack it will still load the Stack in memory and re-resolve the output value. This means that the EndpointMap's endpoint_map output, which is huge, gets loaded and recalculated whenever showing the EndpointMap or KeystoneUrl outputs of the main (overcloud) stack. To avoid this, store the value locally in an OS::Heat::Value resource. This means that the EndpointMap will only be resolved once, during the stack create/update, and the outputs can refer to that value. Change-Id: Ia79eceeea309f5508713a310849f5d366a035430 Depends-On: If0f80cab94c28514d1569b1025362ab9d9d31512 --- overcloud.j2.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index dea748ed..dcce907c 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -243,6 +243,12 @@ resources: NetIpMap: {get_attr: [VipMap, net_ip_map]} ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]} + EndpointMapData: + type: OS::Heat::Value + properties: + type: json + value: {get_attr: [EndpointMap, endpoint_map]} + # Jinja loop for Role in roles_data.yaml {% for role in roles %} # Resources generated for {{role.name}} Role @@ -621,7 +627,7 @@ outputs: value: true KeystoneURL: description: URL for the Overcloud Keystone service - value: {get_attr: [EndpointMap, endpoint_map, KeystonePublic, uri]} + value: {get_attr: [EndpointMapData, value, KeystonePublic, uri]} KeystoneAdminVip: description: Keystone Admin VIP endpoint value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystoneAdminApiNetwork]}]} @@ -630,7 +636,7 @@ outputs: Mapping of the resources with the needed info for their endpoints. This includes the protocol used, the IP, port and also a full representation of the URI. - value: {get_attr: [EndpointMap, endpoint_map]} + value: {get_attr: [EndpointMapData, value]} HostsEntry: description: | The content that should be appended to your /etc/hosts if you want to get -- cgit 1.2.3-korg