From a017ecac9f2ea9353f9cf5829490c20ee875660d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Thu, 3 Jan 2019 11:38:22 +0100 Subject: [PATCH] Fall back public_virtual_ip to ctlplane if External net not present public_virtual_ip previously required the External network to be present in networks data. Add a conditional to use the VIP on the ctlplane if the External network is not in networks data. Closes-Bug: #1774401 Change-Id: Ie6c3d7124d11ee89788b432da39df16f031fcf12 --- puppet/all-nodes-config.j2.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/puppet/all-nodes-config.j2.yaml b/puppet/all-nodes-config.j2.yaml index 7e7b4c1b10..ef43e99fd3 100644 --- a/puppet/all-nodes-config.j2.yaml +++ b/puppet/all-nodes-config.j2.yaml @@ -200,7 +200,11 @@ resources: get_param: [NetVipMap, {get_param: [ServiceNetMap, keystone_admin_api_network]}] keystone_public_api_vip: get_param: [NetVipMap, {get_param: [ServiceNetMap, keystone_public_api_network]}] +{%- if 'External' in _networks %} public_virtual_ip: {get_param: [NetVipMap, {get_param: ExternalNetName}]} +{%- else %} + public_virtual_ip: {get_param: [NetVipMap, ctlplane]} +{%- endif %} controller_virtual_ip: {get_param: [NetVipMap, ctlplane]} {%- if 'InternalApi' in _networks %} # the internal_api_virtual_ip is needed for contrail only @@ -222,9 +226,14 @@ resources: {%- endfor %} # public_virtual_ip and controller_virtual_ip are needed in # both HAproxy & keepalived. +{%- if 'External' in _networks %} tripleo::haproxy::public_virtual_ip: {get_param: [NetVipMap, {get_param: ExternalNetName}]} - tripleo::haproxy::controller_virtual_ip: {get_param: [NetVipMap, ctlplane]} tripleo::keepalived::public_virtual_ip: {get_param: [NetVipMap, {get_param: ExternalNetName}]} +{%- else %} + tripleo::haproxy::public_virtual_ip: {get_param: [NetVipMap, ctlplane]} + tripleo::keepalived::public_virtual_ip: {get_param: [NetVipMap, ctlplane]} +{%- endif %} + tripleo::haproxy::controller_virtual_ip: {get_param: [NetVipMap, ctlplane]} tripleo::keepalived::controller_virtual_ip: {get_param: [NetVipMap, ctlplane]} tripleo::keepalived::redis_virtual_ip: {get_param: RedisVirtualIP} tripleo::redis_notification::haproxy_monitor_ip: {get_param: [NetVipMap, ctlplane]}