summaryrefslogtreecommitdiffstats
path: root/cli
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 /cli
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 'cli')
-rw-r--r--cli/src/cli-cmd-parser.c4
-rw-r--r--cli/src/cli-rpc-ops.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index f3b8887d554..178ba1bc641 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -2870,6 +2870,10 @@ cli_cmd_volume_status_parse (const char **words, int wordcount,
cmd |= GF_CLI_STATUS_QUOTAD;
} else if (!strcmp (words[3], "snapd")) {
cmd |= GF_CLI_STATUS_SNAPD;
+ } else if (!strcmp (words[3], "bitd")) {
+ cmd |= GF_CLI_STATUS_BITD;
+ } else if (!strcmp (words[3], "scrub")) {
+ cmd |= GF_CLI_STATUS_SCRUB;
} else {
cmd = GF_CLI_STATUS_BRICK;
ret = dict_set_str (dict, "brick",
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 400c4842225..87b0a284457 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -7056,7 +7056,8 @@ gf_cli_status_cbk (struct rpc_req *req, struct iovec *iov,
}
if ((cmd & GF_CLI_STATUS_NFS) || (cmd & GF_CLI_STATUS_SHD) ||
- (cmd & GF_CLI_STATUS_QUOTAD) || (cmd & GF_CLI_STATUS_SNAPD))
+ (cmd & GF_CLI_STATUS_QUOTAD) || (cmd & GF_CLI_STATUS_SNAPD) ||
+ (cmd & GF_CLI_STATUS_BITD) || (cmd & GF_CLI_STATUS_SCRUB))
notbrick = _gf_true;
if (global_state->mode & GLUSTER_MODE_XML) {
@@ -7176,7 +7177,9 @@ gf_cli_status_cbk (struct rpc_req *req, struct iovec *iov,
if (!strcmp (hostname, "NFS Server") ||
!strcmp (hostname, "Self-heal Daemon") ||
!strcmp (hostname, "Quota Daemon") ||
- !strcmp (hostname, "Snapshot Daemon"))
+ !strcmp (hostname, "Snapshot Daemon") ||
+ !strcmp (hostname, "Scrubber Daemon") ||
+ !strcmp (hostname, "Bitrot Daemon"))
snprintf (status.brick, PATH_MAX + 255, "%s on %s",
hostname, path);
else {