1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
samba-mirror/ctdb/tests/simple/00_ctdb_onnode.sh
Martin Schwenke 417ee2f0aa tests/simple: Add -p in onnode test to help show groups of connections
Change the command from "true" to "hostname" since the former won't
produce any output when used in combination with "onnode -p".  This
could just be changed to "echo" but the hostname might actually be
useful.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ae3c03d80264e997b7da9f3279d7810e18b8a1df)
2013-07-22 19:36:58 +10:00

39 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
test_info()
{
cat <<EOF
Use 'onnode' to confirm connectivity between all cluster nodes.
Steps:
1. Do a recursive "onnode all" to make sure all the nodes can connect
to each other. On a cluster this ensures that SSH keys are known
between all hosts, which will stop output being corrupted with
messages about nodes being added to the list of known hosts.
Expected results:
* 'onnode' works between all nodes.
EOF
}
. "${TEST_SCRIPTS_DIR}/integration.bash"
ctdb_test_init "$@"
#
echo "Checking connectivity between nodes..."
onnode all onnode -p all hostname
# We're seeing some weirdness with CTDB controls timing out. We're
# wondering if time is jumping forward, so this creates a time log on
# each node that we can examine later if tests fail weirdly.
if [ -z "$TEST_LOCAL_DAEMONS" -a -n "$CTDB_TEST_TIME_LOGGING" ] ; then
echo "Starting time logging on each node..."
f="${TEST_VAR_DIR}/ctdb.test.time.log"
onnode -p all "[ -f $f ] || while : ; do date '+%s %N' ; sleep 1 ; done >$f 2>&1 </dev/null &" &
fi