Revert "ctdb-tests: Update preamble for INTEGRATION tests"
[Samba.git] / ctdb / tests / INTEGRATION / failover / pubips.010.addip.sh
blobaefed54c45ea5da75c65d561e1b6e7ea8fd20ba9
1 #!/bin/bash
3 test_info()
5 cat <<EOF
6 Verify that an IP address can be added to a node using 'ctdb addip'.
8 This test does not do any network level checks to make sure IP
9 addresses are actually on interfaces. It just consults "ctdb ip".
10 EOF
13 . "${TEST_SCRIPTS_DIR}/integration.bash"
15 ctdb_test_init
17 set -e
19 cluster_is_healthy
21 select_test_node_and_ips
22 get_test_ip_mask_and_iface
24 echo "Deleting IP $test_ip from all nodes"
25 delete_ip_from_all_nodes $test_ip
26 try_command_on_node -v $test_node $CTDB ipreallocate
27 wait_until_ips_are_on_node '!' $test_node $test_ip
29 # Debugging...
30 try_command_on_node -v all $CTDB ip
32 echo "Adding IP ${test_ip}/${mask} on ${iface}, node ${test_node}"
33 try_command_on_node $test_node $CTDB addip ${test_ip}/${mask} $iface
34 try_command_on_node $test_node $CTDB ipreallocate
35 wait_until_ips_are_on_node $test_node $test_ip