ctdb-tests: Update integration tests to use ctdb -X
[Samba.git] / ctdb / tests / simple / 16_ctdb_config_add_ip.sh
blobb5d76ea7ad69e63e9b15460c8f577f6576934fc5
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 # Reset configuration
22 ctdb_restart_when_done
24 select_test_node_and_ips
25 get_test_ip_mask_and_iface
27 echo "Deleting IP $test_ip from all nodes"
28 try_command_on_node $test_node $CTDB delip -n all $test_ip
29 wait_until_ips_are_on_node '!' $test_node $test_ip
31 # Debugging...
32 try_command_on_node -v all $CTDB ip
34 echo "Adding IP ${test_ip}/${mask} on ${iface}, node ${test_node}"
35 try_command_on_node $test_node $CTDB addip ${test_ip}/${mask} $iface
36 wait_until_ips_are_on_node $test_node $test_ip