Use management address when available

In case of defining different IP address for SSH and Management
network in metal scenario, as described in [1], you get SSH address
defined as `ansible_host`, which results in HAProxy configuring
backends on SSH address rather then management one, where
service is actually listening.

We use `ansible_host` as a fallback for non-OSA usage of the role.

[1] https://docs.openstack.org/openstack-ansible/latest/reference/inventory/configure-inventory.html#having-ssh-network-different-from-openstack-management-network

Change-Id: If9896e99e1b0bb58098020606765093d320943ae
Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
This commit is contained in:
Dmitriy Rabotyagov
2025-09-03 17:48:08 +02:00
parent 67f506eb73
commit a9718f24ed
2 changed files with 10 additions and 1 deletions

View File

@@ -133,7 +133,7 @@ galera_innodb_log_file_size: 1024M
galera_innodb_log_buffer_size: 128M
## wsrep configuration
galera_wsrep_address: "{{ ansible_host }}"
galera_wsrep_address: "{{ management_address | default(ansible_host) }}"
galera_wsrep_address_port: "{{ galera_wsrep_address }}:3306"
galera_wsrep_cluster_port: 4567
galera_wsrep_cluster_address: >-

View File

@@ -0,0 +1,9 @@
---
upgrade:
- |
Default value of ``galera_wsrep_address`` has changed from
``ansible_host``, which could vary based on the deployment scenario,
to ``management_address``, which will be set to the IP of the
management network.
The fallback to ``ansible_host`` is present to avoid failures when
``management_address`` is not defined.