6 Verify that 'ctdb listnodes' shows the list of nodes in a ctdb cluster.
10 * An active CTDB cluster with at least 2 active nodes.
14 1. Verify that the status on all of the ctdb nodes is 'OK'.
15 2. Run 'ctdb listnodes' on all the nodes of the cluster.
16 3. Verify that one all the nodes the command displays a list of
17 current cluster nodes.
21 * 'ctdb listnodes' displays the correct information.
25 .
"${TEST_SCRIPTS_DIR}/integration.bash"
33 try_command_on_node
-v 0 "$CTDB listnodes"
35 num_nodes
=$
(echo "$out" |
wc -l)
37 # Each line should look like an IP address.
38 ipv4_pat
='[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'
39 ipv6_pat
='[[:xdigit:]]+:[[:xdigit:]:]+[[:xdigit:]]+'
42 "^${ipv4_pat}|${ipv6_pat}\$" \
47 echo "Checking other nodes..."
50 while [ $n -lt $num_nodes ] ; do
52 try_command_on_node
$n "$CTDB listnodes"
53 if [ "$out_0" = "$out" ] ; then
56 echo "DIFFERs from node 0:"