From 1756857f5dd7d19dba5a6a33c8e713c44fcabfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 17 Jun 2020 17:12:45 +0300 Subject: [PATCH] Fix galera initialization with 10.4 For whatever reason, galera complains on startup about wsrep_cluster_address missing even when mysql_install_db is run. By making sure that we configure it before we initialize the database, the problems seem to go away. --- maxscale-system-test/maxtest/src/mariadb_nodes.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maxscale-system-test/maxtest/src/mariadb_nodes.cc b/maxscale-system-test/maxtest/src/mariadb_nodes.cc index 83a926fed..3df50d9dd 100644 --- a/maxscale-system-test/maxtest/src/mariadb_nodes.cc +++ b/maxscale-system-test/maxtest/src/mariadb_nodes.cc @@ -448,12 +448,14 @@ int Galera_nodes::start_galera() for (int i = 0; i < N; i++) { // Remove the grastate.dat file - ssh_node(i, "rm -f /var/lib/mysql/grastate.dat", true); ssh_node(i, "echo [mysqld] > cluster_address.cnf", true); ssh_node_f(i, true, "echo wsrep_cluster_address=gcomm://%s >> cluster_address.cnf", gcomm.c_str()); ssh_node(i, "cp cluster_address.cnf /etc/my.cnf.d/", true); + ssh_node(i, "rm -rf /var/lib/mysql/*", true); + ssh_node(i, "mysql_install_db --user=mysql", true); + ssh_node_f(i, true, "sed -i 's/###NODE-ADDRESS###/%s/' /etc/my.cnf.d/* /etc/mysql/my.cnf.d/*;" @@ -467,7 +469,7 @@ int Galera_nodes::start_galera() // Start the first node that also starts a new cluster ssh_node_f(0, true, "galera_new_cluster"); - for (int i = 0; i < N; i++) + for (int i = 1; i < N; i++) { if (start_node(i, "") != 0) {