File: 00_ctdb_onnode.sh

package info (click to toggle)
ctdb 1.12%2Bgit20120201-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,656 kB
  • sloc: ansic: 61,736; sh: 18,367; xml: 3,887; python: 1,220; makefile: 554; perl: 319; awk: 118
file content (38 lines) | stat: -rwxr-xr-x 1,006 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/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
}

. ctdb_test_functions.bash

ctdb_test_init "$@"


# 

echo "Checking connectivity between nodes..."
onnode all onnode all true

# 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 [ -n "$CTDB_TEST_REAL_CLUSTER" ] ; then
    echo "Starting time logging on each node..."
    f="/var/log/ctdb.test.time.log"
    onnode -p all "[ -f $f ] || while : ; do date '+%s %N' ; sleep 1 ; done >$f 2>&1 </dev/null &"  &
fi