summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-04-09 15:36:20 +0530
committerKaushal M <kaushal@redhat.com>2015-05-06 20:59:46 -0700
commit2d919eab43dfbcfbaa2617b161f3f4bdd1381e96 (patch)
tree8a741eb51257b2710d7ff7af6dfe7de528408501 /tests
parent626da0e0c8d9240dc78bc596ee6592dc8875e14d (diff)
glusterd: gluster volume status should show status of bitrot and scrubber daemon
Command gluster volume status <VOLNAME> should show the status of bitrot and scrubber daemon and its pid information. Along with displaying bitrot and scrubber daemon information in gluster volume status command there should be command to show its individual status separately. Command to show individual status of bitrot and scrubber daemon will following. command to show only bitd daemon information will be gluster volume status <VOLNAME> bitd command to show only scrubber daemon information gluster volume status <VOLNAME> scrub Change-Id: Id86aae1156c8c599347c98e2a538f294d37376e4 BUG: 1218123 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10175 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Kaushal M <kaushal@redhat.com> (cherry picked from commit da1416051d19d612d131acfde8589bc8658979b5) Reviewed-on: http://review.gluster.org/10519 Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t70
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t b/tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t
new file mode 100644
index 00000000000..263df31ff38
--- /dev/null
+++ b/tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+## Test case for bitrot
+## gluster volume status command should show status of bitrot daemon
+
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+. $(dirname $0)/../../cluster.rc
+
+cleanup;
+
+function get_bitd_count_from_cli1 {
+ $CLI_1 volume status $V0 | grep "Bitrot Daemon" | grep -v grep | wc -l
+}
+
+function get_scrubd_count_from_cli2 {
+ $CLI_2 volume status $V0 | grep "Scrubber Daemon" | grep -v grep | wc -l
+}
+
+
+## Start a 2 node virtual cluster
+TEST launch_cluster 2;
+
+## Peer probe server 2 from server 1 cli
+TEST $CLI_1 peer probe $H2;
+
+EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
+
+## Lets create and start the volume
+TEST $CLI_1 volume create $V0 $H1:$B1/${V0}0 $H2:$B2/${V0}1
+TEST $CLI_1 volume start $V0
+
+## Enable bitrot on volume $V0
+TEST $CLI_1 volume bitrot $V0 enable
+
+## From node 1 Gluster volume status command should show the status of bitrot
+## daemon of all the nodes. there are 2 nodes in a cluster with having brick
+## ${V0}1 and ${V0}2 . So there should be 2 bitrot daemon running.
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_bitd_count_from_cli1
+
+
+## From node 2 Gluster volume status command should show the status of Scrubber
+## daemon of all the nodes. There are 2 nodes in a cluster with having brick
+## ${V0}1 and ${V0}2 . So there should be 2 Scrubber daemon running.
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_scrubd_count_from_cli2
+
+
+## From node 1 Gluster volume status command should print status of only
+## scrubber daemon. There should be total 2 scrubber daemon running, one daemon
+## for each node
+
+scrub=$($CLI_1 volume status $V0 scrub | grep "Scrubber Daemon" | \
+ grep -v grep | wc -l)
+TEST [ "$scrub" -eq 2 ];
+
+
+
+## From node 2 Gluster volume status command should print status of only
+## bitd daemon. There should be total 2 bitd daemon running, one daemon
+## for each node
+
+bitd=$($CLI_2 volume status $V0 bitd | grep "Bitrot Daemon" | \
+ grep -v grep | wc -l)
+TEST [ "$bitd" -eq 2 ];
+
+
+cleanup;