6 Verify that an interface is deleted when all IPs on it are deleted.
10 .
"${TEST_SCRIPTS_DIR}/integration.bash"
18 select_test_node_and_ips
20 # Find interfaces on test node
21 try_command_on_node
$test_node "$CTDB ifaces -X"
22 ifaces
=$
(awk -F'|' 'NR > 1 { print $2 }' <<<"$out")
23 echo "Node ${test_node} has interfaces: ${ifaces}"
25 # Delete all IPs on each interface... deleting IPs from one interface
26 # can cause other interfaces to disappear, so we need to be careful...
28 try_command_on_node
$test_node "$CTDB ifaces -X"
29 info
=$
(awk -F'|' -v iface
="$i" '$2 == iface { print $0 }' <<<"$out")
31 if [ -z "$info" ] ; then
32 echo "Interface ${i} missing... assuming already deleted!"
36 echo "Deleting IPs on interface ${i}, with this information:"
39 try_command_on_node
$test_node "$CTDB ip -v -X | tail -n +2"
41 '$6 == i { print $2 }' <<<"$out" |
44 try_command_on_node
$test_node "$CTDB delip $ip"
46 try_command_on_node
$test_node "$CTDB ipreallocate"
48 try_command_on_node
$test_node "$CTDB ifaces -X"
49 info
=$
(awk -F'|' -v iface
="$i" '$2 == iface { print $0 }' <<<"$out")
51 if [ -z "$info" ] ; then
52 echo "GOOD: Interface ${i} has been garbage collected"
54 echo "BAD: Interface ${i} still exists"