[SCM] CTDB repository - branch 2.5 updated - ctdb-2.5.2-6-g81aa603

Amitay Isaacs amitay at samba.org
Thu Feb 13 17:19:24 MST 2014


The branch, 2.5 has been updated
       via  81aa6036ea3db32045926ffe3879a139b71f364e (commit)
       via  76ddc9474fd0a115d0dde2161d48035d71aca516 (commit)
       via  d3c6cbafc35b9c70ff41fb0c9a7141a75275e434 (commit)
      from  e5e99bf3912008ebcd5af6043689c72f206571b2 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=2.5


- Log -----------------------------------------------------------------
commit 81aa6036ea3db32045926ffe3879a139b71f364e
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Feb 12 15:33:19 2014 +1100

    tests: Handle interactions with monitor events
    
    In the first case, reconfiguration can longer happen in a monitor
    event, so this is no longer a problem.  Drop it.
    
    Running a monitor event by hand no longer cancels the existing monitor
    event.  Instead the hand-run event fails.  So do this differently and
    just wait for a monitor event before continuing.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Thu Feb 13 04:05:57 CET 2014 on sn-devel-104
    
    (Imported from commit a9ccdec008ebcb1b286eede4f43167e3e4d4cbe0)

commit 76ddc9474fd0a115d0dde2161d48035d71aca516
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Feb 7 17:19:20 2014 +1100

    recoverd: Fix a bug in the LCP2 rebalancing code
    
    srcimbl gets changed on every iteration of the loop.  The value that
    should be stored for the new imbalance of the source node is
    minsrcimbl.
    
    To help diagnose this, added some extra debug that can be left in.
    
    The extra debug changes the output of a couple of tests.  Note that
    the resulting IP allocations in those tests is unchanged - only the
    debug output is changed.
    
    Also add some new tests that illustrates the bug.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    (Imported from commit f1a20d748f6ab4702be5b17047a3fbfa0f3e8d0c)

commit d3c6cbafc35b9c70ff41fb0c9a7141a75275e434
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Feb 12 09:49:11 2014 +1100

    tests: New test to ensure "ctdb reloadips" manipulates IPs correctly
    
    This adds a lot of IPs (currently 100) in a new network and deletes
    them in a few steps.  First the primary is deleted and then a check is
    done to ensure that the remaining IPs are all correct.  Then about 1/2
    of the IPs and deleted and remaining IPs are checked.  Then the
    remaining IPs are deleted and a check is done to ensure they are all
    gone.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    (Imported from commit 50fc53d7f11a3c28fd4ef5318d90f842bbc0f19c)

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_takeover.c                 |    5 +-
 tests/complex/18_ctdb_reloadips.sh     |  234 +++++++++++++++++
 tests/simple/60_recoverd_missing_ip.sh |   10 +-
 tests/takeover/lcp2.005.sh             |   63 ++++-
 tests/takeover/lcp2.023.sh             |   34 ++-
 tests/takeover/lcp2.031.sh             |  143 ++++++++++
 tests/takeover/lcp2.032.sh             |  450 ++++++++++++++++++++++++++++++++
 7 files changed, 910 insertions(+), 29 deletions(-)
 create mode 100755 tests/complex/18_ctdb_reloadips.sh
 create mode 100755 tests/takeover/lcp2.031.sh
 create mode 100755 tests/takeover/lcp2.032.sh


Changeset truncated at 500 lines:

diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index c21736e..d3a6e25 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -1958,7 +1958,7 @@ static bool lcp2_failback_candidate(struct ctdb_context *ctdb,
 				  mindstnode, mindstimbl - lcp2_imbalances[mindstnode]));
 
 
-		lcp2_imbalances[srcnode] = srcimbl;
+		lcp2_imbalances[srcnode] = minsrcimbl;
 		lcp2_imbalances[mindstnode] = mindstimbl;
 		minip->pnn = mindstnode;
 
@@ -2024,10 +2024,13 @@ try_again:
 	 * iterate through candidates.  Usually the 1st one will be
 	 * used, so this doesn't cost much...
 	 */
+	DEBUG(DEBUG_DEBUG,("+++++++++++++++++++++++++++++++++++++++++\n"));
+	DEBUG(DEBUG_DEBUG,("Selecting most imbalanced node from:\n"));
 	lips = talloc_array(ctdb, struct lcp2_imbalance_pnn, numnodes);
 	for (i=0; i<numnodes; i++) {
 		lips[i].imbalance = lcp2_imbalances[i];
 		lips[i].pnn = i;
+		DEBUG(DEBUG_DEBUG,(" %d [%d]\n", i, lcp2_imbalances[i]));
 	}
 	qsort(lips, numnodes, sizeof(struct lcp2_imbalance_pnn),
 	      lcp2_cmp_imbalance_pnn);
diff --git a/tests/complex/18_ctdb_reloadips.sh b/tests/complex/18_ctdb_reloadips.sh
new file mode 100755
index 0000000..042683c
--- /dev/null
+++ b/tests/complex/18_ctdb_reloadips.sh
@@ -0,0 +1,234 @@
+#!/bin/bash
+
+test_info()
+{
+    cat <<EOF
+Verify that adding/deleting IPs using 'ctdb reloadips' works
+
+Checks that when IPs are added to and deleted from a single node then
+those IPs are actually assigned and unassigned from the specified
+interface.
+
+Prerequisites:
+
+* An active CTDB cluster with public IP addresses configured
+
+Expected results:
+
+* When IPs are added to a single node then they are assigned to an
+  interface.
+
+* When IPs are deleted from a single node then they disappear from an
+  interface.
+EOF
+}
+
+. "${TEST_SCRIPTS_DIR}/integration.bash"
+
+set -e
+
+ctdb_test_init "$@"
+
+ctdb_test_check_real_cluster
+
+cluster_is_healthy
+
+# Reset configuration
+ctdb_restart_when_done
+
+select_test_node_and_ips
+
+####################
+
+# Search for an unused 10.B.1.0/24 network on which to add public IP
+# addresses.
+
+# The initial search is for a 10.B.0.0/16 network since some
+# configurations may use a whole class B for the private network.
+# Check that there are no public IP addresses (as reported by "ctdb ip
+# -n -all") or other IP addresses (as reported by "ip addr show") with
+# the provided prefix.  Note that this is an IPv4-specific test.
+
+echo "Getting public IP information from CTDB..."
+try_command_on_node any "$CTDB ip -Y -v -n all"
+ctdb_ip_info=$(echo "$out" | awk -F: 'NR > 1 { print $2, $3, $5 }')
+
+echo "Getting IP information from interfaces..."
+try_command_on_node all "ip addr show"
+ip_addr_info=$(echo "$out" | \
+    awk '$1 == "inet" { print gensub(/\/.*/, "", "", $2)}')
+
+prefix=""
+for b in $(seq 0 255) ; do
+    prefix="10.${b}"
+
+    # Does the prefix match any IP address returned by "ip addr info"?
+    while read ip ; do
+	if [ "${ip#${prefix}.}" != "$ip" ] ; then
+	    prefix=""
+	    continue 2
+	fi
+    done <<<"$ip_addr_info"
+
+    # Does the prefix match any public IP address "ctdb ip -n all"?
+    while read ip pnn iface ; do
+	if [ "${ip#${prefix}.}" != "$ip" ] ; then
+	    prefix=""
+	    continue 2
+	fi
+    done <<<"$ctdb_ip_info"
+
+    # Got through the IPs without matching prefix - done!
+    break
+done
+
+[ -n "$prefix" ] || die "Unable to find a usable IP address prefix"
+
+# We really want a class C: 10.B.1.0/24
+prefix="${prefix}.1"
+
+####################
+
+iface=$(echo "$ctdb_ip_info" | awk -v pnn=$test_node '$2 == pnn { print $3 ; exit }')
+
+####################
+
+new_takeover_timeout=90
+echo "Setting TakeoverTimeout=${new_takeover_timeout} to avoid potential bans"
+try_command_on_node $test_node "$CTDB setvar TakeoverTimeout ${new_takeover_timeout}"
+
+####################
+
+addresses=$(get_ctdbd_command_line_option $test_node "public-addresses")
+echo "Public addresses file on node $test_node is \"$addresses\""
+backup="${addresses}.$$"
+
+backup_public_addresses ()
+{
+    try_command_on_node $test_node "cp -a $addresses $backup"
+}
+
+restore_public_addresses ()
+{
+    try_command_on_node $test_node "mv $backup $addresses >/dev/null 2>&1 || true"
+}
+ctdb_test_exit_hook_add restore_public_addresses
+
+# Now create that backup
+backup_public_addresses
+
+####################
+
+add_ips_to_original_config ()
+{
+    local test_node="$1"
+    local addresses="$2"
+    local iface="$3"
+    local prefix="$4"
+    local first="$5"
+    local last="$6"
+
+    echo "Adding new public IPs to original config on node ${test_node}..."
+    echo "IPs will be ${prefix}.${first}/24..${prefix}.${last}/24"
+
+    # Implement this by completely rebuilding the public_addresses
+    # file.  This is easier than deleting entries on a remote node.
+    restore_public_addresses
+    backup_public_addresses
+
+    # Note that tee is a safe way of creating a file on a remote node.
+    # This avoids potential fragility with quoting or redirection.
+    for i in $(seq $first $last) ; do
+	echo "${prefix}.${i}/24 ${iface}"
+    done |
+    try_command_on_node -i $test_node "tee -a $addresses"
+}
+
+check_ips ()
+{
+    local test_node="$1"
+    local iface="$2"
+    local prefix="$3"
+    local first="$4"
+    local last="$5"
+
+    # If just 0 specified then this is an empty range
+    local public_ips_file=$(mktemp)
+    if [ "$first" = 0 -a -z "$last" ] ; then
+	echo "Checking that there are no IPs in ${prefix}.0/24"
+    else
+	local prefix_regexp="inet *${prefix//./\.}"
+
+	echo "Checking IPs in range ${prefix}.${first}/24..${prefix}.${last}/24"
+
+	local i
+	for i in $(seq $first $last) ; do
+	    echo "${prefix}.${i}"
+	done | sort >"$public_ips_file"
+    fi
+
+    try_command_on_node $test_node "ip addr show dev ${iface}"
+    local ip_addrs_file=$(mktemp)
+    echo "$out" | \
+	sed -n -e "s at .*inet * \(${prefix//./\.}\.[0-9]*\)/.*@\1 at p" | \
+	sort >"$ip_addrs_file"
+
+    local diffs=$(diff "$public_ips_file" "$ip_addrs_file") || true
+    rm -f "$ip_addrs_file" "$public_ips_file"
+
+    if [ -z "$diffs" ] ; then
+	echo "GOOD: IP addresses are as expected"
+    else
+	echo "BAD: IP addresses are incorrect:"
+	echo "$diffs"
+	exit 1
+    fi
+}
+
+####################
+
+new_ip_max=100
+
+####################
+
+add_ips_to_original_config \
+    $test_node "$addresses" "$iface" "$prefix" 1 $new_ip_max
+
+try_command_on_node $test_node "$CTDB reloadips"
+
+check_ips $test_node "$iface" "$prefix" 1 $new_ip_max
+
+####################
+
+# This should be the primary.  Ensure that no other IPs are lost
+echo "Using 'ctdb reloadips' to remove the 1st address just added..."
+
+add_ips_to_original_config \
+    $test_node "$addresses" "$iface" "$prefix" 2 $new_ip_max
+
+try_command_on_node $test_node "$CTDB reloadips"
+
+check_ips $test_node "$iface" "$prefix" 2 $new_ip_max
+
+####################
+
+# Get rid of about 1/2 the IPs
+start=$(($new_ip_max / 2 + 1))
+echo "Updating to include only about 1/2 of the new IPs..."
+
+add_ips_to_original_config \
+    $test_node "$addresses" "$iface" "$prefix" $start $new_ip_max
+
+try_command_on_node $test_node "$CTDB reloadips"
+
+check_ips $test_node "$iface" "$prefix" $start $new_ip_max
+
+####################
+
+# Delete the rest
+echo "Restoring original IP configuration..."
+restore_public_addresses
+
+try_command_on_node $test_node "$CTDB reloadips"
+
+check_ips $test_node "$iface" "$prefix" 0
diff --git a/tests/simple/60_recoverd_missing_ip.sh b/tests/simple/60_recoverd_missing_ip.sh
index 0734aee..88e4502 100755
--- a/tests/simple/60_recoverd_missing_ip.sh
+++ b/tests/simple/60_recoverd_missing_ip.sh
@@ -37,10 +37,6 @@ fi
 
 echo "$test_ip/$mask is on $iface"
 
-# Push out the next monitor event so it is less likely to be cancelled
-# and result in services not being restarted properly.
-try_command_on_node $test_node $CTDB eventscript monitor
-
 echo "Deleting IP $test_ip from all nodes"
 try_command_on_node -v $test_node $CTDB delip -n all $test_ip
 
@@ -61,9 +57,9 @@ ctdb_test_exit_hook_add my_exit_hook
 # delips is complete.
 try_command_on_node $test_node $CTDB sync
 
-# This effectively cancels any monitor event that is in progress and
-# runs a new one
-try_command_on_node $test_node $CTDB eventscript monitor
+# Wait for a monitor event.  Then the next steps are unlikely to occur
+# in the middle of a monitor event and will have the expected effect.
+wait_for_monitor_event $test_node
 
 if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
     # Stop monitor events from bringing up the link status of an interface
diff --git a/tests/takeover/lcp2.005.sh b/tests/takeover/lcp2.005.sh
index 113e52f..4e0bed8 100755
--- a/tests/takeover/lcp2.005.sh
+++ b/tests/takeover/lcp2.005.sh
@@ -10,6 +10,11 @@ required_result <<EOF
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES (UNASSIGNED)
 DATE TIME [PID]:  ----------------------------------------
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [0]
+DATE TIME [PID]:  1 [539166]
+DATE TIME [PID]:  2 [0]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [539166]
 DATE TIME [PID]:  1 [-116718] -> 192.168.21.254 -> 0 [+0]
@@ -32,8 +37,13 @@ DATE TIME [PID]:  1 [-121110] -> 192.168.20.249 -> 0 [+0]
 DATE TIME [PID]:  1 [-121110] -> 192.168.20.249 -> 2 [+0]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 1 [-121363] -> 192.168.20.253 -> 0 [+0]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [0]
+DATE TIME [PID]:  1 [417803]
+DATE TIME [PID]:  2 [0]
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [418056]
+DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [417803]
 DATE TIME [PID]:  1 [-102557] -> 192.168.21.254 -> 0 [+14161]
 DATE TIME [PID]:  1 [-102557] -> 192.168.21.254 -> 2 [+0]
 DATE TIME [PID]:  1 [-102810] -> 192.168.21.253 -> 0 [+14161]
@@ -52,8 +62,13 @@ DATE TIME [PID]:  1 [-105485] -> 192.168.20.249 -> 0 [+15625]
 DATE TIME [PID]:  1 [-105485] -> 192.168.20.249 -> 2 [+0]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 1 [-105738] -> 192.168.20.251 -> 2 [+0]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [0]
+DATE TIME [PID]:  1 [312065]
+DATE TIME [PID]:  2 [0]
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [312571]
+DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [312065]
 DATE TIME [PID]:  1 [-88396] -> 192.168.21.254 -> 0 [+14161]
 DATE TIME [PID]:  1 [-88396] -> 192.168.21.254 -> 2 [+14161]
 DATE TIME [PID]:  1 [-88649] -> 192.168.21.253 -> 0 [+14161]
@@ -70,8 +85,13 @@ DATE TIME [PID]:  1 [-89609] -> 192.168.20.249 -> 0 [+15625]
 DATE TIME [PID]:  1 [-89609] -> 192.168.20.249 -> 2 [+15876]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 1 [-88649] -> 192.168.21.253 -> 0 [+14161]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [14161]
+DATE TIME [PID]:  1 [223416]
+DATE TIME [PID]:  2 [0]
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [222962]
+DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [223416]
 DATE TIME [PID]:  1 [-72520] -> 192.168.21.254 -> 0 [+30037]
 DATE TIME [PID]:  1 [-72520] -> 192.168.21.254 -> 2 [+14161]
 DATE TIME [PID]:  1 [-72520] -> 192.168.21.252 -> 0 [+30290]
@@ -86,8 +106,13 @@ DATE TIME [PID]:  1 [-75448] -> 192.168.20.249 -> 0 [+29786]
 DATE TIME [PID]:  1 [-75448] -> 192.168.20.249 -> 2 [+15876]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 1 [-75448] -> 192.168.20.254 -> 2 [+15625]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [14161]
+DATE TIME [PID]:  1 [147968]
+DATE TIME [PID]:  2 [15625]
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [147514]
+DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [147968]
 DATE TIME [PID]:  1 [-58359] -> 192.168.21.254 -> 0 [+30037]
 DATE TIME [PID]:  1 [-58359] -> 192.168.21.254 -> 2 [+28322]
 DATE TIME [PID]:  1 [-58359] -> 192.168.21.252 -> 0 [+30290]
@@ -100,8 +125,13 @@ DATE TIME [PID]:  1 [-59823] -> 192.168.20.249 -> 0 [+29786]
 DATE TIME [PID]:  1 [-59823] -> 192.168.20.249 -> 2 [+31501]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 1 [-59823] -> 192.168.20.250 -> 0 [+29786]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [43947]
+DATE TIME [PID]:  1 [88145]
+DATE TIME [PID]:  2 [15625]
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [87691]
+DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [88145]
 DATE TIME [PID]:  1 [-44198] -> 192.168.21.254 -> 0 [+44198]
 DATE TIME [PID]:  1 [-44198] -> 192.168.21.254 -> 2 [+28322]
 DATE TIME [PID]:  1 [-44198] -> 192.168.21.252 -> 0 [+44451]
@@ -112,6 +142,11 @@ DATE TIME [PID]:  1 [-43947] -> 192.168.20.249 -> 0 [+45662]
 DATE TIME [PID]:  1 [-43947] -> 192.168.20.249 -> 2 [+31501]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 1 [-44198] -> 192.168.21.254 -> 2 [+28322]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [43947]
+DATE TIME [PID]:  1 [43947]
+DATE TIME [PID]:  2 [43947]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES FROM 0 [43947]
 DATE TIME [PID]:  0 [-28322] -> 192.168.21.253 -> 0 [+28322]
@@ -122,6 +157,15 @@ DATE TIME [PID]:  0 [-29786] -> 192.168.20.250 -> 0 [+29786]
 DATE TIME [PID]:  0 [-29786] -> 192.168.20.250 -> 2 [+45915]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  ----------------------------------------
+DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [43947]
+DATE TIME [PID]:  1 [-28322] -> 192.168.21.252 -> 0 [+44451]
+DATE TIME [PID]:  1 [-28322] -> 192.168.21.252 -> 2 [+44198]
+DATE TIME [PID]:  1 [-29786] -> 192.168.20.252 -> 0 [+45915]
+DATE TIME [PID]:  1 [-29786] -> 192.168.20.252 -> 2 [+45662]
+DATE TIME [PID]:  1 [-29786] -> 192.168.20.249 -> 0 [+45662]
+DATE TIME [PID]:  1 [-29786] -> 192.168.20.249 -> 2 [+45662]
+DATE TIME [PID]:  ----------------------------------------
+DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES FROM 2 [43947]
 DATE TIME [PID]:  2 [-28322] -> 192.168.21.254 -> 0 [+44198]
 DATE TIME [PID]:  2 [-28322] -> 192.168.21.254 -> 2 [+28322]
@@ -130,15 +174,6 @@ DATE TIME [PID]:  2 [-29786] -> 192.168.20.254 -> 2 [+29786]
 DATE TIME [PID]:  2 [-29786] -> 192.168.20.251 -> 0 [+45915]
 DATE TIME [PID]:  2 [-29786] -> 192.168.20.251 -> 2 [+29786]
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [43744]
-DATE TIME [PID]:  1 [-28322] -> 192.168.21.252 -> 0 [+44451]
-DATE TIME [PID]:  1 [-28322] -> 192.168.21.252 -> 2 [+44198]
-DATE TIME [PID]:  1 [-29786] -> 192.168.20.252 -> 0 [+45915]
-DATE TIME [PID]:  1 [-29786] -> 192.168.20.252 -> 2 [+45662]
-DATE TIME [PID]:  1 [-29786] -> 192.168.20.249 -> 0 [+45662]
-DATE TIME [PID]:  1 [-29786] -> 192.168.20.249 -> 2 [+45662]
-DATE TIME [PID]:  ----------------------------------------
 192.168.21.254 2
 192.168.21.253 0
 192.168.21.252 1
diff --git a/tests/takeover/lcp2.023.sh b/tests/takeover/lcp2.023.sh
index 9bffc58..0f35b3e 100755
--- a/tests/takeover/lcp2.023.sh
+++ b/tests/takeover/lcp2.023.sh
@@ -10,6 +10,11 @@ required_result <<EOF
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES (UNASSIGNED)
 DATE TIME [PID]:  ----------------------------------------
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [89609]
+DATE TIME [PID]:  1 [0]
+DATE TIME [PID]:  2 [147968]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES FROM 2 [147968]
 DATE TIME [PID]:  2 [-58359] -> 192.168.21.254 -> 1 [+0]
@@ -19,6 +24,11 @@ DATE TIME [PID]:  2 [-59823] -> 192.168.20.251 -> 1 [+0]
 DATE TIME [PID]:  2 [-59823] -> 192.168.20.249 -> 1 [+0]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 2 [-59823] -> 192.168.20.251 -> 1 [+0]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [89609]
+DATE TIME [PID]:  1 [0]
+DATE TIME [PID]:  2 [88145]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES FROM 0 [89609]
 DATE TIME [PID]:  0 [-42483] -> 192.168.21.253 -> 1 [+14161]
@@ -27,6 +37,11 @@ DATE TIME [PID]:  0 [-45662] -> 192.168.20.252 -> 1 [+15625]
 DATE TIME [PID]:  0 [-45411] -> 192.168.20.250 -> 1 [+16129]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 0 [-45662] -> 192.168.20.254 -> 1 [+15625]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [43947]
+DATE TIME [PID]:  1 [15625]
+DATE TIME [PID]:  2 [88145]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES FROM 2 [88145]
 DATE TIME [PID]:  2 [-44198] -> 192.168.21.254 -> 1 [+28322]
@@ -35,24 +50,29 @@ DATE TIME [PID]:  2 [-43947] -> 192.168.20.253 -> 1 [+31501]
 DATE TIME [PID]:  2 [-43947] -> 192.168.20.249 -> 1 [+31501]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]: 2 [-44198] -> 192.168.21.254 -> 1 [+28322]
+DATE TIME [PID]: +++++++++++++++++++++++++++++++++++++++++
+DATE TIME [PID]: Selecting most imbalanced node from:
+DATE TIME [PID]:  0 [43947]
+DATE TIME [PID]:  1 [43947]
+DATE TIME [PID]:  2 [43947]
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 0 [44198]
+DATE TIME [PID]:  CONSIDERING MOVES FROM 0 [43947]
 DATE TIME [PID]:  0 [-28322] -> 192.168.21.253 -> 1 [+44198]
 DATE TIME [PID]:  0 [-29786] -> 192.168.20.252 -> 1 [+45662]
 DATE TIME [PID]:  0 [-29786] -> 192.168.20.250 -> 1 [+45915]
 DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  CONSIDERING MOVES FROM 2 [44198]
-DATE TIME [PID]:  2 [-28322] -> 192.168.21.252 -> 1 [+44198]
-DATE TIME [PID]:  2 [-29786] -> 192.168.20.253 -> 1 [+45662]
-DATE TIME [PID]:  2 [-29786] -> 192.168.20.249 -> 1 [+45662]
-DATE TIME [PID]:  ----------------------------------------
-DATE TIME [PID]:  ----------------------------------------
 DATE TIME [PID]:  CONSIDERING MOVES FROM 1 [43947]
 DATE TIME [PID]:  1 [-28322] -> 192.168.21.254 -> 1 [+28322]
 DATE TIME [PID]:  1 [-29786] -> 192.168.20.254 -> 1 [+29786]
 DATE TIME [PID]:  1 [-29786] -> 192.168.20.251 -> 1 [+29786]
 DATE TIME [PID]:  ----------------------------------------
+DATE TIME [PID]:  ----------------------------------------
+DATE TIME [PID]:  CONSIDERING MOVES FROM 2 [43947]


-- 
CTDB repository


More information about the samba-cvs mailing list