From 0039c23202739fd47df54183ab6e3c7070fc4579 Mon Sep 17 00:00:00 2001 From: Sergii Golovatiuk Date: Tue, 26 Jan 2016 18:21:28 +0100 Subject: [PATCH] Add SST check to mysql_status Change-Id: Ib7dd20a0322ecb57748188290d5c52467b82c765 Closes-Bug: 1478310 --- files/fuel-ha-utils/ocf/mysql-wss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/files/fuel-ha-utils/ocf/mysql-wss b/files/fuel-ha-utils/ocf/mysql-wss index 176ee449f5..fd2690825e 100644 --- a/files/fuel-ha-utils/ocf/mysql-wss +++ b/files/fuel-ha-utils/ocf/mysql-wss @@ -435,7 +435,13 @@ mysql_status() { i=${2:-3} sleeptime=${3:-5} while [ $i -gt 0 ]; do + if [ -f "${OCF_RESKEY_datadir}"/sst_in_progress ]; then + ocf_log 'SST is in progress' + return $OCF_SUCCESS + fi + if [ -f "$OCF_RESKEY_pid" ]; then + ocf_log 'MySQL PID found' break fi sleep $sleeptime @@ -443,7 +449,6 @@ mysql_status() { ocf_log info "PIDFile ${OCF_RESKEY_pid} of MySQL server not found. Sleeping for $sleeptime seconds. ${i} retries left" done - if [ $i -eq 0 ]; then ocf_log $1 "MySQL is not running" return $OCF_NOT_RUNNING; @@ -470,7 +475,6 @@ mysql_monitor() { status_loglevel="info" fi - if [ -f "${OCF_RESKEY_datadir}"/sst_in_progress ]; then ocf_log 'SST is in progress' return $OCF_SUCCESS