The branch, master has been updated
via af72f8bc05f78983f9624d81788f9d89af474b11 (commit)
via a7ad2fb75f06791508dd928d2a0c305fc7f7b814 (commit)
via db69a39ca010b2c8853b13466e30792dda350cdb (commit)
via a0340a50c2acd9ccc281faef032a364254f7f95a (commit)
from f06634951331232cddf0b48eac3552b92aca5b93 (commit)
http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit af72f8bc05f78983f9624d81788f9d89af474b11
Merge: f06634951331232cddf0b48eac3552b92aca5b93
a7ad2fb75f06791508dd928d2a0c305fc7f7b814
Author: Ronnie Sahlberg <[email protected]>
Date: Thu Mar 15 16:09:41 2012 +1100
Merge remote branch 'martins/master'
commit a7ad2fb75f06791508dd928d2a0c305fc7f7b814
Author: Martin Schwenke <[email protected]>
Date: Mon Feb 13 13:34:57 2012 +1100
Tests - functions/environment - set and use $CTDB_NODES
"ctdb listnodes" changed so that it never tries to contact the daemon
but reads the local nodes file instead. This fails if the nodes file
is in a non-default place but $CTDB_NODES isn't set.
Signed-off-by: Martin Schwenke <[email protected]>
commit db69a39ca010b2c8853b13466e30792dda350cdb
Author: Martin Schwenke <[email protected]>
Date: Mon Feb 13 13:32:25 2012 +1100
Tests - simple - make disconnected node tests handle changed error message
Recent changes to nodestring parsing generalised the error message
logged when trying to talk to a disconnected node.
Signed-off-by: Martin Schwenke <[email protected]>
commit a0340a50c2acd9ccc281faef032a364254f7f95a
Author: Martin Schwenke <[email protected]>
Date: Mon Feb 13 13:31:18 2012 +1100
ctdb tool: fix thinko in nodestatus command output
If used with -n <nodes> the "current" node needs to change.
Signed-off-by: Martin Schwenke <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
tests/scripts/ctdb_test_env | 2 ++
tests/scripts/ctdb_test_functions.bash | 8 +++-----
tests/simple/09_ctdb_ping.sh | 2 +-
..._ctdb_config_check_error_on_unreachable_ctdb.sh | 6 +++---
tools/ctdb.c | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/tests/scripts/ctdb_test_env b/tests/scripts/ctdb_test_env
index 5c3006e..f550d79 100755
--- a/tests/scripts/ctdb_test_env
+++ b/tests/scripts/ctdb_test_env
@@ -32,6 +32,8 @@ if [ ! -n "$CTDB_TEST_REAL_CLUSTER" ] ; then
done
PATH="${CTDB_DIR}/bin:${CTDB_DIR}/tests/bin:${PATH}"
+
+ export CTDB_NODES="$var_dir/nodes.txt"
fi
# If $VALGRIND is set then use it whenever ctdb is called, but only if
diff --git a/tests/scripts/ctdb_test_functions.bash
b/tests/scripts/ctdb_test_functions.bash
index 670b91e..256ad99 100644
--- a/tests/scripts/ctdb_test_functions.bash
+++ b/tests/scripts/ctdb_test_functions.bash
@@ -720,10 +720,9 @@ daemons_setup ()
mkdir -p $var_dir/test.db/persistent
- local nodes=$var_dir/nodes.txt
local public_addresses=$var_dir/public_addresses.txt
local no_public_addresses=$var_dir/no_public_addresses.txt
- rm -f $nodes $public_addresses $no_public_addresses
+ rm -f $CTDB_NODES $public_addresses $no_public_addresses
# If there are (strictly) greater than 2 nodes then we'll randomly
# choose a node to have no public addresses.
@@ -737,7 +736,7 @@ daemons_setup ()
echo ::$i >> $nodes
ip addr add ::$i/128 dev lo
else
- echo 127.0.0.$i >> $nodes
+ echo 127.0.0.$i >> $CTDB_NODES
# 2 public addresses on most nodes, just to make things interesting.
if [ $(($i - 1)) -ne $no_public_ips ] ; then
echo "192.0.2.$i/24 lo" >> $public_addresses
@@ -754,7 +753,6 @@ daemons_start_1 ()
local var_dir=$CTDB_DIR/tests/var
- local nodes=$var_dir/nodes.txt
local public_addresses=$var_dir/public_addresses.txt
local no_public_addresses=$var_dir/no_public_addresses.txt
@@ -765,7 +763,7 @@ daemons_start_1 ()
echo "Node $no_public_ips will have no public IPs."
fi
- local ctdb_options="--reclock=$var_dir/rec.lock --nlist $nodes
--nopublicipcheck --event-script-dir=$CTDB_DIR/tests/events.d
--logfile=$var_dir/daemons.log -d 0 --dbdir=$var_dir/test.db
--dbdir-persistent=$var_dir/test.db/persistent
--dbdir-state=$var_dir/test.db/state"
+ local ctdb_options="--reclock=$var_dir/rec.lock --nlist $CTDB_NODES
--nopublicipcheck --event-script-dir=$CTDB_DIR/tests/events.d
--logfile=$var_dir/daemons.log -d 0 --dbdir=$var_dir/test.db
--dbdir-persistent=$var_dir/test.db/persistent
--dbdir-state=$var_dir/test.db/state"
if [ $(id -u) -eq 0 ]; then
ctdb_options="$ctdb_options --public-interface=lo"
diff --git a/tests/simple/09_ctdb_ping.sh b/tests/simple/09_ctdb_ping.sh
index 401e48d..50612a2 100755
--- a/tests/simple/09_ctdb_ping.sh
+++ b/tests/simple/09_ctdb_ping.sh
@@ -53,5 +53,5 @@ try_command_on_node -v 0 "! $CTDB ping -n 1"
sanity_check_output \
1 \
- "(: ctdb_control error: ('ctdb_control to disconnected node'|'node is
disconnected')|Unable to get ping response from node 1|Node 1 is
DISCONNECTED|ctdb_control for getpnn failed|: Can not access node. Node is not
operational\.)" \
+ "(: ctdb_control error: ('ctdb_control to disconnected node'|'node is
disconnected')|Unable to get ping response from node 1|Node 1 is
DISCONNECTED|ctdb_control for getpnn failed|: Can not access node. Node is not
operational\.|Node 1 has status DISCONNECTED\|UNHEALTHY\|INACTIVE$)" \
"$out"
diff --git a/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh
b/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh
index cddc21c..78541d6 100755
--- a/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh
+++ b/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh
@@ -54,15 +54,15 @@ try_command_on_node $test_node $CTDB shutdown
wait_until_node_has_status $test_node disconnected 30 0
-pat="ctdb_control error: 'ctdb_control to disconnected node'|ctdb_control
error: 'node is disconnected'|Node $test_node is DISCONNECTED"
+pat="ctdb_control error: 'ctdb_control to disconnected node'|ctdb_control
error: 'node is disconnected'|Node $test_node is DISCONNECTED|Node $test_node
has status DISCONNECTED\|UNHEALTHY\|INACTIVE"
for i in ip disable enable "ban 0" unban listvars ; do
try_command_on_node -v 0 ! $CTDB $i -n $test_node
if egrep -q "$pat" <<<"$out" ; then
- echo "OK: \"ctdb ${i}\" fails with \"disconnected node\""
+ echo "OK: \"ctdb ${i}\" fails with expected \"disconnected node\"
message"
else
- echo "BAD: \"ctdb ${i}\" does not fail with \"disconnected node\""
+ echo "BAD: \"ctdb ${i}\" does not fail with expected \"disconnected
node\" message"
exit 1
fi
done
diff --git a/tools/ctdb.c b/tools/ctdb.c
index ad30989..756671b 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -936,7 +936,7 @@ static int control_nodestatus(struct ctdb_context *ctdb,
int argc, const char **
printf("Number of nodes:%d\n", (int)
talloc_array_length(nodes));
}
- if (!ctdb_getpnn(ctdb_connection, CTDB_CURRENT_NODE, &mypnn)) {
+ if (!ctdb_getpnn(ctdb_connection, options.pnn, &mypnn)) {
DEBUG(DEBUG_ERR, ("Unable to get PNN from local node\n"));
return -1;
}
--
CTDB repository