From 13c354cf70004f24570b81cc8f291af98ed7380c Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 18 Mar 2018 04:37:39 +0100 Subject: Fix recovery --- root-galera/usr/bin/run-mysqld-galera | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/root-galera/usr/bin/run-mysqld-galera b/root-galera/usr/bin/run-mysqld-galera index f1a0d76..9ff6c26 100755 --- a/root-galera/usr/bin/run-mysqld-galera +++ b/root-galera/usr/bin/run-mysqld-galera @@ -42,12 +42,17 @@ if [ ! -d "$MYSQL_DATADIR/mysql" ]; then # Restart the MySQL server with public IP bindings shutdown_local_mysql else - no_cluster=$(grep -P "gcomm://$" $MYSQL_DEFAULTS_FILE/cluster.cnf | cat) + no_cluster=$(grep -P "gcomm://$" ${MYSQL_DEFAULTS_FILE}.d/cluster.cnf | cat) if [ -n "$no_cluster" ]; then - log_info "No cluster configured, recovering from failure..." + log_info "Configuration: $MYSQL_DEFAULTS_FILE" + log_info "No cluster is configured yet, trying to recover from failure..." log_info "Allowing recovery in $MYSQL_DATADIR/grastate.dat" - sed -i'' -e 's/safe_to_bootstrap:.*/safe_to_bootstrap: 1/' $MYSQL_DATADIR/grastate.dat - mysql_extra_opts="--wsrep-new-cluster" + sed -i'' 's/safe_to_bootstrap:.*/safe_to_bootstrap: 1/' $MYSQL_DATADIR/grastate.dat +# This seems unneeded +# mysql_extra_opts="--wsrep-new-cluster" + else + log_info "Configuration: $MYSQL_DEFAULTS_FILE" + log_info "Cluster is configured. Trying to join..." fi # galera files -- cgit v1.2.3