mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
Merge remote branch 'martins/master'
(This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)
This commit is contained in:
commit
b3ddf6901d
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user