summaryrefslogtreecommitdiffstats
path: root/root-galera/usr
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-18 04:37:39 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-18 04:37:39 +0100
commit13c354cf70004f24570b81cc8f291af98ed7380c (patch)
tree39e2255168282407318635147926502b7540d103 /root-galera/usr
parent14d10bc21087e3734d4e7ac15883c76d0cd19818 (diff)
downloadmysql-galera-13c354cf70004f24570b81cc8f291af98ed7380c.tar.gz
mysql-galera-13c354cf70004f24570b81cc8f291af98ed7380c.tar.bz2
mysql-galera-13c354cf70004f24570b81cc8f291af98ed7380c.tar.xz
mysql-galera-13c354cf70004f24570b81cc8f291af98ed7380c.zip
Fix recovery
Diffstat (limited to 'root-galera/usr')
-rwxr-xr-xroot-galera/usr/bin/run-mysqld-galera13
1 files 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