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 Depends-On: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/822681 Change-Id: Ic7743e7cd640703d166aecd97f59cbaf11c65500 (cherry picked from commit2894ef9d3e
) (cherry picked from commitdc7f164ffa
)
This commit is contained in:
parent
a8f518af9f
commit
fcb25bd256
|
@ -12,16 +12,7 @@
|
||||||
{% set _ = vip_data.__setitem__('internal_api_virtual_ip', (net_vip_map[networks['InternalApi']['name_lower']])) %}
|
{% set _ = vip_data.__setitem__('internal_api_virtual_ip', (net_vip_map[networks['InternalApi']['name_lower']])) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set _ = vip_data.__setitem__('network_virtual_ips', network_virtual_ips) %}
|
{% set _ = vip_data.__setitem__('network_virtual_ips', network_virtual_ips) %}
|
||||||
{% for network in enabled_networks %}
|
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[service_net_map['ganesha_network']])) %}
|
||||||
{% 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__('ceph_dashboard_vip', (net_vip_map[service_net_map['ceph_dashboard_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. #}
|
{# public_virtual_ip and controller_virtual_ip are needed in both HAproxy & keepalived. #}
|
||||||
{% if 'External' in enabled_networks %}
|
{% if 'External' in enabled_networks %}
|
||||||
|
|
Loading…
Reference in New Issue