From 868c7685f19acdfba4aaa29ae1e12522d904f95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Thu, 3 Jan 2019 11:18:59 +0100 Subject: [PATCH] Only add internal_api_virtual_ip if InternalApi in network_data Add's a conditional to only include internal_api_virtual_ip if InternalApi network is defined in custom networks. According to code comment internal_api_virtual_ip is only used by Contrail. Change-Id: Ifd8f59bd03c9bab1283e580a64957f201eb8f335 Closes-Bug: #1772124 --- puppet/all-nodes-config.j2.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/puppet/all-nodes-config.j2.yaml b/puppet/all-nodes-config.j2.yaml index 15269f837a..7e7b4c1b10 100644 --- a/puppet/all-nodes-config.j2.yaml +++ b/puppet/all-nodes-config.j2.yaml @@ -1,3 +1,7 @@ +{%- set _networks = [] -%} +{%- for network in networks -%} + {%- set _networks = _networks.append(network.name) -%} +{%- endfor -%} heat_template_version: rocky description: 'All Nodes Config for Puppet' @@ -198,8 +202,10 @@ resources: get_param: [NetVipMap, {get_param: [ServiceNetMap, keystone_public_api_network]}] public_virtual_ip: {get_param: [NetVipMap, {get_param: ExternalNetName}]} controller_virtual_ip: {get_param: [NetVipMap, ctlplane]} +{%- if 'InternalApi' in _networks %} # the internal_api_virtual_ip is needed for contrail only internal_api_virtual_ip: {get_param: [NetVipMap, {get_param: InternalApiNetName}]} +{%- endif %} network_virtual_ips: {%- for network in networks if network.vip|default(false) %} # External virtual ip is currently being handled separately as public_virtual_ip.