mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
35 lines
658 B
Bash
35 lines
658 B
Bash
|
#!/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
|