1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/ctdb/tests/simple/35_ctdb_getreclock.sh
Martin Schwenke a3c2a39ea2 ctdb-tests: Replace "ctdb setrelock" test with "ctdb getreclock" test
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-06-08 00:51:28 +02:00

35 lines
658 B
Bash
Executable File

#!/bin/bash
test_info()
{
cat <<EOF
Verify that "ctdb getreclock" gets the recovery lock correctly.
Make sure the recovery lock is consistent across all nodes.
EOF
}
. "${TEST_SCRIPTS_DIR}/integration.bash"
ctdb_test_init "$@"
set -e
cluster_is_healthy
echo "Check that recovery lock is set the same on all nodes..."
try_command_on_node -v -q all $CTDB getreclock
if [ -z "$out" ] ; then
echo "GOOD: Recovery lock is unset on all nodes"
exit 0
fi
n=$(echo "$out" | sort -u | wc -l)
if [ "$n" = 1 ] ; then
echo "GOOD: All nodes have the same recovery lock setting"
else
echo "BAD: Recovery lock setting differs across nodes"
exit 1
fi