6 Verify that TAKE_IP will work for an IP that is already on an interface
8 This is a variation of simple/60_recoverd_missing_ip.sh
12 .
"${TEST_SCRIPTS_DIR}/integration.bash"
21 ctdb_restart_when_done
23 select_test_node_and_ips
25 echo "Running test against node $test_node and IP $test_ip"
27 get_test_ip_mask_and_iface
29 echo "Deleting IP $test_ip from all nodes"
30 delete_ip_from_all_nodes
$test_ip
31 try_command_on_node
-v $test_node $CTDB ipreallocate
32 wait_until_ips_are_on_node
! $test_node $test_ip
34 try_command_on_node
-v all
$CTDB ip
36 # The window here needs to small, to try to avoid the address being
37 # released. The test will still pass either way but if the first IP
38 # takeover run does a release then this doesn't test the code path we
40 echo "Adding IP $test_ip to $iface and CTDB on node $test_node"
41 ip_cmd
="ip addr add $test_ip/$mask dev $iface"
42 ctdb_cmd
="$CTDB addip $test_ip/$mask $iface && $CTDB ipreallocate"
43 try_command_on_node
$test_node "$ip_cmd && $ctdb_cmd"
45 wait_until_ips_are_on_node
$test_node $test_ip