smbd: Simplify validate_lock_entries
[Samba.git] / ctdb / tests / simple / 42_ctdb_continue.sh
blob381baf55f06569fc9128e5602dd5a7e578d718f9
1 #!/bin/bash
3 test_info()
5 cat <<EOF
6 Verify the operation of the 'ctdb continue' command.
8 This is a superficial test of the 'ctdb continue' command. It trusts
9 information from CTDB that indicates that the IP failover and failback
10 has happened correctly. Another test should check that the failover
11 and failback has actually happened at the networking level.
13 Prerequisites:
15 * An active CTDB cluster with at least 2 active nodes.
17 Steps:
19 1. Verify that the status on all of the ctdb nodes is 'OK'.
20 2. Stop one of the nodes using the 'ctdb stop' command.
21 3. Verify that the status of the node changes to 'stopped'.
22 4. Verify that the public IP addresses that were being served by
23 the node are failed over to one of the other nodes.
24 5. Use 'ctdb continue' to bring the node back online.
25 6. Verify that the status of the node changes back to 'OK' and that
26 some public IP addresses move back to the node.
28 Expected results:
30 * The 'ctdb continue' command successfully brings a stopped node online.
31 EOF
34 . "${TEST_SCRIPTS_DIR}/integration.bash"
36 ctdb_test_init "$@"
38 set -e
40 cluster_is_healthy
42 # Reset configuration
43 ctdb_restart_when_done
45 select_test_node_and_ips
47 echo "Stopping node ${test_node}..."
48 try_command_on_node 1 $CTDB stop -n $test_node
50 wait_until_node_has_status $test_node stopped
52 if wait_until_ips_are_on_nodeglob "[!${test_node}]" $test_node_ips ; then
53 echo "All IPs moved."
54 else
55 echo "Some IPs didn't move."
56 testfailures=1
59 echo "Continuing node $test_node"
60 try_command_on_node 1 $CTDB continue -n $test_node
62 wait_until_node_has_status $test_node notstopped
64 wait_until_node_has_some_ips "$test_node"