mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
a3c2a39ea2
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
35 lines
658 B
Bash
Executable File
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
|