Update tests accordingly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
continue;
}
if (nodemap->nodes[tmp_ip->pnn].flags & mask) {
+ DEBUG(DEBUG_DEBUG,("Unassign IP: %s from %d\n",
+ ctdb_addr_to_str(&(tmp_ip->addr)),
+ tmp_ip->pnn));
tmp_ip->pnn = -1;
}
}
}
if (can_node_serve_ip(ctdb, tmp_ip->pnn, tmp_ip) != 0) {
/* this node can not serve this ip. */
+ DEBUG(DEBUG_DEBUG,("Unassign IP: %s from %d\n",
+ ctdb_addr_to_str(&(tmp_ip->addr)),
+ tmp_ip->pnn));
tmp_ip->pnn = -1;
}
}
required_result <<EOF
DATE TIME [PID]: Deterministic IPs enabled. Resetting all ip allocations
+DATE TIME [PID]: Unassign IP: 192.168.21.254 from 0
+DATE TIME [PID]: Unassign IP: 192.168.21.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.254 from 0
+DATE TIME [PID]: Unassign IP: 192.168.20.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.251 from 0
+DATE TIME [PID]: Unassign IP: 192.168.20.250 from 1
192.168.21.254 2
192.168.21.253 2
192.168.21.252 2
required_result <<EOF
DATE TIME [PID]: Deterministic IPs enabled. Resetting all ip allocations
+DATE TIME [PID]: Unassign IP: 192.168.21.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.250 from 1
192.168.21.254 0
192.168.21.253 0
192.168.21.252 2
define_test "3 nodes, 1 healthy"
required_result <<EOF
+DATE TIME [PID]: Unassign IP: 192.168.21.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.21.252 from 0
+DATE TIME [PID]: Unassign IP: 192.168.20.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.252 from 0
+DATE TIME [PID]: Unassign IP: 192.168.20.250 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.249 from 0
192.168.21.254 2
192.168.21.253 2
192.168.21.252 2
define_test "3 nodes, 2 healthy"
required_result <<EOF
+DATE TIME [PID]: Unassign IP: 192.168.21.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.253 from 1
+DATE TIME [PID]: Unassign IP: 192.168.20.250 from 1
192.168.21.254 2
192.168.21.253 0
192.168.21.252 0
simple_test ()
{
# Do some filtering of the output to replace date/time.
- if [ \( "$CTDB_IP_ALGORITHM" = "lcp2" -a -n "$CTDB_TEST_LOGLEVEL" \) -o \
- "$CTDB_IP_ALGORITHM" = "det" ] ; then
- OUT_FILTER='s@^.*:@DATE\ TIME\ \[PID\]:@'
- fi
+ OUT_FILTER='s@^[^\]]*\]:@DATE\ TIME\ \[PID\]:@'
_states="$1"
_out=$($VALGRIND $test_prog $_states 2>&1)