Add SST check to mysql_status
Change-Id: Ib7dd20a0322ecb57748188290d5c52467b82c765
Closes-Bug: 1478310
(cherry picked from commit 0039c23202
)
This commit is contained in:
parent
f7a008e680
commit
a6cb75f1e3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue