mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdb-tests: Drop dependency on variable ctdb_test_restart_scheduled
The remainder of the scheduled restart logic is about to be removed, so produce debugging information any time the cluster is not healthy. While here, reindent and drop the else since there is already an early return before it. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
bc8df7191c
commit
79db138de5
@ -288,24 +288,25 @@ _cluster_is_ready ()
|
||||
|
||||
cluster_is_healthy ()
|
||||
{
|
||||
if onnode 0 $CTDB_TEST_WRAPPER _cluster_is_healthy ; then
|
||||
echo "Cluster is HEALTHY"
|
||||
if ! onnode 0 $CTDB_TEST_WRAPPER _cluster_is_recovered ; then
|
||||
echo "WARNING: cluster in recovery mode!"
|
||||
if onnode 0 $CTDB_TEST_WRAPPER _cluster_is_healthy ; then
|
||||
echo "Cluster is HEALTHY"
|
||||
if ! onnode 0 $CTDB_TEST_WRAPPER _cluster_is_recovered ; then
|
||||
echo "WARNING: cluster in recovery mode!"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
return 0
|
||||
else
|
||||
|
||||
echo "Cluster is UNHEALTHY"
|
||||
if ! ${ctdb_test_restart_scheduled:-false} ; then
|
||||
echo "DEBUG AT $(date '+%F %T'):"
|
||||
local i
|
||||
for i in "onnode -q 0 $CTDB status" "onnode -q 0 onnode all $CTDB scriptstatus" ; do
|
||||
|
||||
echo "DEBUG AT $(date '+%F %T'):"
|
||||
local i
|
||||
for i in "onnode -q 0 $CTDB status" \
|
||||
"onnode -q 0 onnode all $CTDB scriptstatus" ; do
|
||||
echo "$i"
|
||||
$i || true
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
wait_until_ready ()
|
||||
|
Loading…
Reference in New Issue
Block a user