From 4ab0504e29721073dea3c04541f2249440351df5 Mon Sep 17 00:00:00 2001 From: Sanju Abraham Date: Fri, 22 May 2015 22:09:33 -0700 Subject: [PATCH] Close-Bug: #1449230. Fix provides galera node recovery on node / rack / power / network failures and data consistency after the failures Change-Id: Ibae7cb0f9ea6b933dcb5d5b5c0202fc673176883 --- .../openstack/scripts/contrail-bootstrap-galera.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrail_provisioning/openstack/scripts/contrail-bootstrap-galera.sh b/contrail_provisioning/openstack/scripts/contrail-bootstrap-galera.sh index 6131b5ee..1a62305c 100755 --- a/contrail_provisioning/openstack/scripts/contrail-bootstrap-galera.sh +++ b/contrail_provisioning/openstack/scripts/contrail-bootstrap-galera.sh @@ -165,7 +165,7 @@ log_info_msg "Bootstraping galera cluster." cmd="service mysql start --wsrep_recover" log_info_msg "Starting mysql recovery: $cmd" setsid $cmd >> $LOGFILE - if [ -f $GRA_FILE ]; then + if [ -f $GRA_FILE ] && [ ! -s "$GRA_FILE" ]; then uuid=$(cat $GRA_FILE | grep uuid | awk '{print $2}') gtid=$(grep "Recovered position: $uuid" /var/log/mysql/error.log | awk '{print $7}' | cut -d ":" -f 2 | tail -1) echo $gtid > $GTID_FILE