Make sure we add all_nodes_extra_map_data to all_nodes

Refactor of `overcloud cell export` in https://review.opendev.org/#/c/694115/
fixed the filtered AllNodesConfig to be exported as
AllNodesExtraMapData. Now when all_nodes_extra_map_data includes
information for services which are not enabled on the cell controllers
the information is still required to point to the correct endpoint.
This make sure we add all the information from all_nodes_extra_map_data
to the hieradata in case of nova_additional_cell.

Also this change addes Prefer redis_vip from all_nodes_extra_map_data.
When all_nodes_extra_map_data includes a value for redis_vip that
value should be preferred over any other.

Closes-Bug: #1853472

Change-Id: Ib0016d0e0139d336dd9c8afe5fe9b10bb0cf0124
changes/05/695805/6
Martin Schuppert 3 years ago
parent 7bb5baa64e
commit 7385d5e4c5
  1. 15
      tripleo_ansible/roles/tripleo-hieradata/templates/all_nodes.j2

@ -36,10 +36,19 @@
{% for key, value in service_net_map.items() %}
{% set _ = all_nodes.__setitem__(key, value) %}
{% endfor %}
{% if 'redis' in all_enabled_services %}
{% set _ = all_nodes.__setitem__('redis_vip', (net_vip_map.redis)) %}
{% if nova_additional_cell %}
{% for key, value in all_nodes_extra_map_data.items() %}
{% set _ = all_nodes.__setitem__(key, value) %}
{% endfor %}
{% endif %}
{% if 'ovn_dbs' in all_enabled_services %}
{% if 'redis' in all_enabled_services or nova_additional_cell %}
{% if 'redis_vip' in all_nodes_extra_map_data %}
{% set _ = all_nodes.__setitem__('redis_vip', all_nodes_extra_map_data['redis_vip']) %}
{% elif net_vip_map.redis is defined %}
{% set _ = all_nodes.__setitem__('redis_vip', (net_vip_map.redis)) %}
{% endif %}
{% endif %}
{% if 'ovn_dbs' in all_enabled_services or nova_additional_cell %}
{% if 'ovn_dbs_vip' in all_nodes_extra_map_data %}
{% set _ = all_nodes.__setitem__('ovn_dbs_vip', all_nodes_extra_map_data['ovn_dbs_vip']) %}
{% elif net_vip_map.ovn_dbs is defined %}

Loading…
Cancel
Save