Add SST check to mysql_status
Change-Id: Ib7dd20a0322ecb57748188290d5c52467b82c765 Closes-Bug: 1478310
This commit is contained in:
parent
1e342c7e91
commit
0039c23202
|
@ -435,7 +435,13 @@ mysql_status() {
|
||||||
i=${2:-3}
|
i=${2:-3}
|
||||||
sleeptime=${3:-5}
|
sleeptime=${3:-5}
|
||||||
while [ $i -gt 0 ]; do
|
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
|
if [ -f "$OCF_RESKEY_pid" ]; then
|
||||||
|
ocf_log 'MySQL PID found'
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep $sleeptime
|
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"
|
ocf_log info "PIDFile ${OCF_RESKEY_pid} of MySQL server not found. Sleeping for $sleeptime seconds. ${i} retries left"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
if [ $i -eq 0 ]; then
|
if [ $i -eq 0 ]; then
|
||||||
ocf_log $1 "MySQL is not running"
|
ocf_log $1 "MySQL is not running"
|
||||||
return $OCF_NOT_RUNNING;
|
return $OCF_NOT_RUNNING;
|
||||||
|
@ -470,7 +475,6 @@ mysql_monitor() {
|
||||||
status_loglevel="info"
|
status_loglevel="info"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -f "${OCF_RESKEY_datadir}"/sst_in_progress ]; then
|
if [ -f "${OCF_RESKEY_datadir}"/sst_in_progress ]; then
|
||||||
ocf_log 'SST is in progress'
|
ocf_log 'SST is in progress'
|
||||||
return $OCF_SUCCESS
|
return $OCF_SUCCESS
|
||||||
|
|
Loading…
Reference in New Issue