Fix OCF MySQL monitor
Return success if SST detected, otherwise check status and return error if it is not OK. Closes-bug: #1574999 Change-Id: I5ee7807821ae1f21bcb3c74e15338acb8bb91ea1 Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
1a43fd1e22
commit
84263cb37f
@ -537,21 +537,13 @@ mysql_monitor() {
|
|||||||
status_loglevel="info"
|
status_loglevel="info"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check_if_sst
|
||||||
|
rc=$?
|
||||||
|
[ $rc -eq $OCF_SUCCESS ] && return $rc
|
||||||
|
|
||||||
mysql_status $status_loglevel
|
mysql_status $status_loglevel
|
||||||
rc=$?
|
rc=$?
|
||||||
check_if_sst
|
[ $rc -eq $OCF_SUCCESS ] || return $rc
|
||||||
rc2=$?
|
|
||||||
if [ $rc2 -eq $OCF_SUCCESS -a $rc -ne $OCF_SUCCESS ] ; then
|
|
||||||
# The sst_in_progress file isn't removed if mysqld has died and shall be purged
|
|
||||||
ocf_log warn "${LH} found and purged a stale sst_in_progress file"
|
|
||||||
rm -f "${OCF_RESKEY_datadir}/sst_in_progress"
|
|
||||||
elif [ $rc2 -eq $OCF_SUCCESS ]; then
|
|
||||||
return $OCF_SUCCESS
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $rc -ne $OCF_SUCCESS ]; then
|
|
||||||
return $rc
|
|
||||||
fi
|
|
||||||
|
|
||||||
update_node_gtid
|
update_node_gtid
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user