replace: Fix bug 11455
[Samba.git] / ctdb / tests / simple / 41_ctdb_stop.sh
blobe11fb0fc7ecaff8022e35177fd2be242de432356
1 #!/bin/bash
3 test_info()
5 cat <<EOF
6 Verify the operation of the 'ctdb stop' command.
8 * Verify that the status of the node changes to 'stopped'.
10 * Verify that the public IP addresses that were being served by
11 the node are failed over to one of the other nodes.
13 This test does not do any network level checks to make sure IP
14 addresses are actually on interfaces. It just consults "ctdb ip".
15 EOF
18 . "${TEST_SCRIPTS_DIR}/integration.bash"
20 ctdb_test_init "$@"
22 set -e
24 cluster_is_healthy
26 # Reset configuration
27 ctdb_restart_when_done
29 select_test_node_and_ips
31 echo "Stopping node ${test_node}..."
32 try_command_on_node 1 $CTDB stop -n $test_node
33 wait_until_node_has_status $test_node stopped
34 wait_until_ips_are_on_node '!' $test_node $test_node_ips