4
## gluster volume status command should show status of bitrot daemon
7
. $(dirname $0)/../../include.rc
8
. $(dirname $0)/../../volume.rc
9
. $(dirname $0)/../../cluster.rc
14
## Start a 2 node virtual cluster
17
## Peer probe server 2 from server 1 cli
18
TEST $CLI_1 peer probe $H2;
20
EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
22
## Lets create and start the volume
23
TEST $CLI_1 volume create $V0 $H1:$B1/${V0}0 $H2:$B2/${V0}1
24
TEST $CLI_1 volume start $V0
26
## Enable bitrot on volume $V0
27
TEST $CLI_1 volume bitrot $V0 enable
29
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_bitd_count
30
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_scrubd_count
32
## From node 1 Gluster volume status command should show the status of bitrot
33
## daemon of all the nodes. there are 2 nodes in a cluster with having brick
34
## ${V0}1 and ${V0}2 . So there should be 2 bitrot daemon running.
36
bitd=$($CLI_1 volume status $V0 | grep "Bitrot Daemon" | grep -v grep | wc -l)
37
TEST [ "$bitd" -eq 2 ];
41
## From node 2 Gluster volume status command should show the status of Scrubber
42
## daemon of all the nodes. There are 2 nodes in a cluster with having brick
43
## ${V0}1 and ${V0}2 . So there should be 2 Scrubber daemon running.
45
scrub=$($CLI_2 volume status $V0 | grep "Scrubber Daemon" | grep -v grep | \
47
TEST [ "$scrub" -eq 2 ];
51
## From node 1 Gluster volume status command should print status of only
52
## scrubber daemon. There should be total 2 scrubber daemon running, one daemon
55
scrub=$($CLI_1 volume status $V0 scrub | grep "Scrubber Daemon" | \
57
TEST [ "$scrub" -eq 2 ];
61
## From node 2 Gluster volume status command should print status of only
62
## bitd daemon. There should be total 2 bitd daemon running, one daemon
65
bitd=$($CLI_2 volume status $V0 bitd | grep "Bitrot Daemon" | \
67
TEST [ "$bitd" -eq 2 ];