torture-krb5: Check for UPN hanlding in krb5.kdc.canon test
[Samba.git] / ctdb / tests / simple / 43_stop_recmaster_yield.sh
blobe7a825002e56dc93fd4927df4e231421d68ca8df
1 #!/bin/bash
3 test_info()
5 cat <<EOF
6 Verify that 'ctdb stop' causes a node to yield the recovery master role.
8 Prerequisites:
10 * An active CTDB cluster with at least 2 active nodes.
12 Steps:
14 1. Determine which node is the recmaster.
15 2. Stop this node using the 'ctdb stop' command.
16 3. Verify that the status of the node changes to 'stopped'.
17 4. Verify that this node no longer has the recovery master role.
19 Expected results:
21 * The 'ctdb stop' command causes a node to yield the recmaster role.
22 EOF
25 . "${TEST_SCRIPTS_DIR}/integration.bash"
27 ctdb_test_init "$@"
29 set -e
31 cluster_is_healthy
33 # Reset configuration
34 ctdb_restart_when_done
36 echo "Finding out which node is the recovery master..."
37 try_command_on_node -v 0 "$CTDB recmaster"
38 test_node=$out
40 echo "Stopping node ${test_node} - it is the current recmaster..."
41 try_command_on_node 1 $CTDB stop -n $test_node
43 wait_until_node_has_status $test_node stopped
45 echo "Checking which node is the recovery master now..."
46 try_command_on_node -v 0 "$CTDB recmaster"
47 recmaster=$out
49 if [ "$recmaster" != "$test_node" ] ; then
50 echo "OK: recmaster moved to node $recmaster"
51 else
52 echo "BAD: recmaster did not move"
53 exit 1