From e21f2f82cf05e20f21aa7ac6bc3e3f891e6bf76e Mon Sep 17 00:00:00 2001 From: gutleib Date: Mon, 25 Nov 2024 00:58:38 +0300 Subject: [PATCH 1/2] Update galera.cnf.j2 --- templates/etc/mysql/conf.d/galera.cnf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/etc/mysql/conf.d/galera.cnf.j2 b/templates/etc/mysql/conf.d/galera.cnf.j2 index fd83374..2552061 100644 --- a/templates/etc/mysql/conf.d/galera.cnf.j2 +++ b/templates/etc/mysql/conf.d/galera.cnf.j2 @@ -48,7 +48,7 @@ wsrep_provider={{ galera_wsrep_provider }} wsrep_cluster_name="{{ galera_cluster_name }}" {% set _galera_cluster_node_addresses = [] %} {% for node in galera_cluster_nodes %} -{% set _ = _galera_cluster_node_addresses.append( hostvars[node]['galera_cluster_bind_address'] | default(hostvars[node]['ansible_' ~ galera_cluster_bind_interface]['ipv4']['address']) | mandatory ) %} +{% set _ = _galera_cluster_node_addresses.append( hostvars[node][galera_cluster_bind_address] | default(hostvars[node]['ansible_' ~ galera_cluster_bind_interface]['ipv4']['address']) | mandatory ) %} {% endfor %} wsrep_cluster_address="{{ 'gcomm://' ~ _galera_cluster_node_addresses | map('ansible.utils.ipwrap') | list | join(',') }}" # To start failed cluster comment out above and uncomment below...Once cluster is started revert changes and restart mysql on main node where change was made From 6d52d05ef09b1f594ea4936cf0662cba1dc8e503 Mon Sep 17 00:00:00 2001 From: gutleib Date: Mon, 25 Nov 2024 01:00:05 +0300 Subject: [PATCH 2/2] Update galera.cnf.temp.j2 --- templates/etc/mysql/conf.d/galera.cnf.temp.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/etc/mysql/conf.d/galera.cnf.temp.j2 b/templates/etc/mysql/conf.d/galera.cnf.temp.j2 index 6dfaecb..e5f1b61 100644 --- a/templates/etc/mysql/conf.d/galera.cnf.temp.j2 +++ b/templates/etc/mysql/conf.d/galera.cnf.temp.j2 @@ -48,7 +48,7 @@ wsrep_provider={{ galera_wsrep_provider }} wsrep_cluster_name="{{ galera_cluster_name }}" {% set _galera_cluster_node_addresses = [] %} {% for node in galera_cluster_nodes %} -{% set _ = _galera_cluster_node_addresses.append( hostvars[node]['galera_cluster_bind_address'] | default(hostvars[node]['ansible_' ~ galera_cluster_bind_interface]['ipv4']['address']) | mandatory ) %} +{% set _ = _galera_cluster_node_addresses.append( hostvars[node][galera_cluster_bind_address] | default(hostvars[node]['ansible_' ~ galera_cluster_bind_interface]['ipv4']['address']) | mandatory ) %} {% endfor %} #wsrep_cluster_address="{{ 'gcomm://' ~ _galera_cluster_node_addresses | map('ansible.utils.ipwrap') | list | join(',') }}" # To start failed cluster comment out above and uncomment below...Once cluster is started revert changes and restart mysql on main node where change was made