summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-02-15 19:22:13 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-04-09 17:21:06 +0000
commit2788ddd3a0afa98f78128247cca89427a323b090 (patch)
tree4568c2a808caa62cc06516e6fd3f392250e4217f /cli/src/cli-cmd-parser.c
parente405f6e419387d160f6564d15ad9fd3a43af0d10 (diff)
glusterd: remove-brick status/stop should not show output for non-existing brick
Previously when user start remove-brick operation on a volume then by giving non-existing brick for remove-brick status/stop command it was showing remove-brick status/stoping remove-brick operation on a volume. With this fix it will validate bricks which user have given for remove-brick status/stop command and if bricks are part of volume then it will show statistics of remove-brick operation otherwise it will show error "Incorrect brick <brick_name> for <volume_name>". Change-Id: I151284ef78c25f52d1b39cdbd71ebfb9eb4b8471 BUG: 1121584 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/9681 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index a334fd931bf..140b021e363 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -1721,9 +1721,11 @@ cli_cmd_volume_remove_brick_parse (const char **words, int wordcount,
goto out;
}
- ret = dict_set_int32 (dict, "count", brick_count);
- if (ret)
- goto out;
+ if (command != GF_OP_CMD_STATUS && command != GF_OP_CMD_STOP) {
+ ret = dict_set_int32 (dict, "count", brick_count);
+ if (ret)
+ goto out;
+ }
*options = dict;