Browse Source

Use service_net_map for ceph_dashboard_vip

Instead of if conditionals on hard-coded network names, use the
ServiceNetMap. CephDashboardNetwork defaults to storage_dashboard
with a fallback to 'ctlplane' in the ServiceNetMap.

This will allow custom network names to be used, via overriding
CephDashboardNetwork in ServiceNetMap or via service_net_map_replace
in network data.

Related-Bug: #1946239
Depends-On: I9a62b2cf24b2dd020de74e18af8c7bc0535d12d9
Change-Id: I145d6c0ddd3cbbfed92113db56e22299ab7c9b08
(cherry picked from commit 3af34f0c68)
changes/81/818081/2
Harald Jensås 8 months ago committed by Francesco Pantano
parent
commit
78dd878ee5
No known key found for this signature in database
GPG Key ID: 458D4D1F41BD75C
  1. 1
      tripleo_ansible/roles/tripleo-hieradata/molecule/ansible_hieradata/molecule.yml
  2. 1
      tripleo_ansible/roles/tripleo-hieradata/molecule/hieradata_vars/molecule.yml
  3. 8
      tripleo_ansible/roles/tripleo-hieradata/templates/vip_data.j2

1
tripleo_ansible/roles/tripleo-hieradata/molecule/ansible_hieradata/molecule.yml

@ -191,6 +191,7 @@ provisioner:
barbican_api_network: ctlplane
bindnetwork: ctlplane
ceph_cluster_network: ctlplane
ceph_dashboard_network: ctlplane
ceph_grafana_network: ctlplane
ceph_mon_network: ctlplane
ceph_rgw_network: ctlplane

1
tripleo_ansible/roles/tripleo-hieradata/molecule/hieradata_vars/molecule.yml

@ -191,6 +191,7 @@ provisioner:
barbican_api_network: ctlplane
bindnetwork: ctlplane
ceph_cluster_network: ctlplane
ceph_dashboard_network: ctlplane
ceph_grafana_network: ctlplane
ceph_mon_network: ctlplane
ceph_rgw_network: ctlplane

8
tripleo_ansible/roles/tripleo-hieradata/templates/vip_data.j2

@ -12,10 +12,6 @@
{% 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) %}
{# when ceph monitoring stack is enabled the frontend vip is explicitly set according to CephDashboardNetwork #}
{% if 'ceph_grafana' in enabled_services %}
{% set _ = vip_data.__setitem__('ceph_dashboard_vip', (net_vip_map[service_net_map['ceph_dashboard_network']])) %}
{% endif %}
{% for network in enabled_networks %}
{% if network == 'StorageNFS' %}
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[networks['StorageNFS']['name_lower']])) %}
@ -25,10 +21,8 @@
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[networks['External']['name_lower']])) %}
{% endif %}
{% endif %}
{% if network == 'StorageDashboard' %}
{% set _ = vip_data.__setitem__('ceph_dashboard_vip', (net_vip_map[networks['StorageDashboard']['name_lower']])) %}
{% endif %}
{% endfor %}
{% 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 %}
{% set _ = vip_data.__setitem__('tripleo::haproxy::public_virtual_ip', (net_vip_map[networks['External']['name_lower']])) %}

Loading…
Cancel
Save