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 commit2894ef9d3e
) (cherry picked from commitdc7f164ffa
) (cherry picked from commitfcb25bd256
)
This commit is contained in:
parent
b33463b20b
commit
5e744eb622
|
@ -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…
Reference in New Issue