1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00
samba-mirror/ctdb/tests/UNIT/tool/ctdb.nodestatus.003.sh
Vinit Agnihotri 794f125802 ctdb-tool: Add UNKNOWN pseudo state
When a node is starting, CTDB reports remote nodes as unhealthy by
default.  This can be misleading.

To hide this, report an "UNKNOWN" pseudo state when a remote node is
not disconnected and the runstate is less than or equal to
"FIRST_RECOVERY".

Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-06-28 09:24:31 +00:00

34 lines
695 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "all, 3 nodes, 1 unhealthy"
setup_ctdbd <<EOF
NODEMAP
0 192.168.20.41 0x2
1 192.168.20.42 0x0
2 192.168.20.43 0x0 CURRENT RECMASTER
IFACES
:Name:LinkStatus:References:
:eth2:1:2:
:eth1:1:4:
EOF
required_result 2 <<EOF
Number of nodes:3
pnn:0 192.168.20.41 UNHEALTHY
pnn:1 192.168.20.42 OK
pnn:2 192.168.20.43 OK (THIS NODE)
EOF
simple_test all
required_result 2 <<EOF
|Node|IP|Disconnected|Unknown|Banned|Disabled|Unhealthy|Stopped|Inactive|PartiallyOnline|ThisNode|
|0|192.168.20.41|0|0|0|0|1|0|0|0|N|
|1|192.168.20.42|0|0|0|0|0|0|0|0|N|
|2|192.168.20.43|0|0|0|0|0|0|0|0|Y|
EOF
simple_test -X all