tests: Update README files and add new README files where missing
[vlendec/samba-autobuild/.git] / ctdb / tests / simple / 00_ctdb_onnode.sh
1 #!/bin/bash
2
3 test_info()
4 {
5     cat <<EOF
6 Use 'onnode' to confirm connectivity between all cluster nodes.
7
8 Steps:
9
10 1. Do a recursive "onnode all" to make sure all the nodes can connect
11    to each other.  On a cluster this ensures that SSH keys are known
12    between all hosts, which will stop output being corrupted with
13    messages about nodes being added to the list of known hosts.
14
15 Expected results:
16
17 * 'onnode' works between all nodes.
18 EOF
19 }
20
21 . "${TEST_SCRIPTS_DIR}/integration.bash"
22
23 ctdb_test_init "$@"
24
25
26
27
28 echo "Checking connectivity between nodes..."
29 onnode all onnode all true
30
31 # We're seeing some weirdness with CTDB controls timing out.  We're
32 # wondering if time is jumping forward, so this creates a time log on
33 # each node that we can examine later if tests fail weirdly.
34 if [ -z "$TEST_LOCAL_DAEMONS" -a -n "$CTDB_TEST_TIME_LOGGING" ] ; then
35     echo "Starting time logging on each node..."
36     f="/var/log/ctdb.test.time.log"
37     onnode -p all "[ -f $f ] || while : ; do date '+%s %N' ; sleep 1 ; done >$f 2>&1 </dev/null &"  &
38 fi