Add SST check to mysql_status

Change-Id: Ib7dd20a0322ecb57748188290d5c52467b82c765
Closes-Bug: #1478310
(cherry picked from commit 0039c23202)
This commit is contained in:
Sergii Golovatiuk 2016-01-26 18:21:28 +01:00 committed by Tikunov Rodion
parent 356e0e4e0b
commit 5aeab5aaa6
1 changed files with 7 additions and 3 deletions

View File

@ -426,7 +426,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 info 'SST is in progress'
return $OCF_SUCCESS
fi
if [ -f "$OCF_RESKEY_pid" ]; then
ocf_log info 'MySQL PID found'
break
fi
sleep $sleeptime
@ -434,7 +440,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;
@ -461,9 +466,8 @@ mysql_monitor() {
status_loglevel="info"
fi
if [ -f "${OCF_RESKEY_datadir}"/sst_in_progress ]; then
ocf_log 'SST is in progress'
ocf_log info 'SST is in progress'
return $OCF_SUCCESS
fi