6 Verify that 'ctdb setvar NoIPTakeover 1' stops ip addresses from being failed
11 * An active CTDB cluster with at least 2 active nodes.
15 1. Verify that the status on all of the ctdb nodes is 'OK'.
16 2. Use 'ctdb ip' on one of the nodes to list the IP addresses being
18 3. Use 'ctdb moveip' to move an address from one node to another.
19 4. Verify that the IP is no longer being hosted by the first node and is now being hosted by the second node.
23 * 'ctdb moveip' allows an IP address to be moved between cluster nodes.
27 .
"${TEST_SCRIPTS_DIR}/integration.bash"
34 ctdb_restart_when_done
36 try_command_on_node
0 "$CTDB listnodes | wc -l"
38 echo "There are $num_nodes nodes..."
40 if [ $num_nodes -lt 2 ] ; then
41 echo "Less than 2 nodes!"
46 echo "Wait until the ips are reallocated"
48 try_command_on_node
0 "$CTDB ipreallocate"
50 num
=`try_command_on_node -v 1 "$CTDB ip" | grep -v Public | egrep " 1$" | wc -l`
51 echo "Number of addresses on node 1 : $num"
54 echo "Turning on NoIPTakeover on node 1"
55 try_command_on_node
1 "$CTDB setvar NoIPTakeover 1"
56 try_command_on_node
1 "$CTDB ipreallocate"
59 try_command_on_node
1 "$CTDB disable"
60 try_command_on_node
1 "$CTDB ipreallocate"
61 num
=`try_command_on_node -v 1 "$CTDB ip" | grep -v Public | egrep " 1$" | wc -l`
62 echo "Number of addresses on node 1 : $num"
63 [ "$num" != "0" ] && {
64 echo "BAD: node 1 still hosts ip addresses"
69 echo "Enable node 1 again"
70 try_command_on_node
1 "$CTDB enable"
72 try_command_on_node
1 "$CTDB ipreallocate"
73 try_command_on_node
1 "$CTDB ipreallocate"
74 num
=`try_command_on_node -v 1 "$CTDB ip" | grep -v Public | egrep " 1$" | wc -l`
75 echo "Number of addresses on node 1 : $num"
76 [ "$num" != "0" ] && {
77 echo "BAD: node took over ip addresses"
82 echo "OK. ip addresses were not taken over"