Browse Source

Use service_net_map for ganesha_vip

Instead of if conditionals on hard-coded network names, use the
ServiceNetMap. GaneshaNetwork defaults to 'storage_nfs' with a
fallback to 'external' and then to 'ctlplane' in the ServiceNetMap.

This will allow custom network names to be used,
either via overriding GaneshaNetwork in ServiceNetMap or using the
service_net_map_replace in network data.

Related-Bug: #1946239
Change-Id: Ic7743e7cd640703d166aecd97f59cbaf11c65500
(cherry picked from commit 2894ef9d3e)
(cherry picked from commit dc7f164ffa)
changes/45/822045/3
Harald Jensås 7 months ago committed by Tom Barron
parent
commit
6fc91a9657
  1. 11
      tripleo_ansible/roles/tripleo_hieradata/templates/vip_data.j2

11
tripleo_ansible/roles/tripleo_hieradata/templates/vip_data.j2

@ -12,16 +12,7 @@
{% set _ = vip_data.__setitem__('internal_api_virtual_ip', (net_vip_map[networks['InternalApi']['name_lower']])) %}
{% endif %}
{% set _ = vip_data.__setitem__('network_virtual_ips', network_virtual_ips) %}
{% for network in enabled_networks %}
{% if network == 'StorageNFS' %}
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[networks['StorageNFS']['name_lower']])) %}
{% endif %}
{% if not vip_data.ganesha_vip is defined %}
{% if 'External' in enabled_networks %}
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[networks['External']['name_lower']])) %}
{% endif %}
{% endif %}
{% endfor %}
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[service_net_map['ganesha_network']])) %}
{% set _ = vip_data.__setitem__('ceph_dashboard_vip', (net_vip_map[service_net_map['ceph_dashboard_network']])) %}
{# public_virtual_ip and controller_virtual_ip are needed in both HAproxy & keepalived. #}
{% if 'External' in enabled_networks %}

Loading…
Cancel
Save