Browse Source

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
changes/52/628152/6
Harald Jensås 4 years ago
parent
commit
a017ecac9f
  1. 11
      puppet/all-nodes-config.j2.yaml

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

Loading…
Cancel
Save