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
This commit is contained in:
Harald Jensås 2019-01-03 11:38:22 +01:00
parent 868c7685f1
commit a017ecac9f
1 changed files with 10 additions and 1 deletions

View File

@ -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]}