summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-parser.c6
-rw-r--r--cli/src/cli-rpc-ops.c11
2 files changed, 9 insertions, 8 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index dd7ab03bdb9..2aba56b9b3d 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -849,7 +849,7 @@ cli_cmd_volume_remove_brick_parse (const char **words, int wordcount,
char *tmp_brick = NULL;
char *tmp_brick1 = NULL;
char *type_opword[] = { "replica", NULL };
- char *opwords[] = { "start", "commit", "abort", "status",
+ char *opwords[] = { "start", "commit", "stop", "status",
"force", NULL };
char *w = NULL;
int32_t command = GF_OP_CMD_NONE;
@@ -911,8 +911,8 @@ cli_cmd_volume_remove_brick_parse (const char **words, int wordcount,
command = GF_OP_CMD_COMMIT;
if (question)
*question = 1;
- } else if (!strcmp ("abort", w)) {
- command = GF_OP_CMD_ABORT;
+ } else if (!strcmp ("stop", w)) {
+ command = GF_OP_CMD_STOP;
} else if (!strcmp ("status", w)) {
command = GF_OP_CMD_STATUS;
} else if (!strcmp ("force", w)) {
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 1ecb562bdc1..a7450c32e60 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -1592,9 +1592,6 @@ gf_cli3_1_remove_brick_cbk (struct rpc_req *req, struct iovec *iov,
case GF_OP_CMD_COMMIT:
cmd_str = "commit";
break;
- case GF_OP_CMD_ABORT:
- cmd_str = "abort";
- break;
case GF_OP_CMD_COMMIT_FORCE:
cmd_str = "commit force";
break;
@@ -2897,7 +2894,8 @@ gf_cli3_1_remove_brick (call_frame_t *frame, xlator_t *this,
if (ret)
goto out;
- if (command != GF_OP_CMD_STATUS) {
+ if ((command != GF_OP_CMD_STATUS) &&
+ (command != GF_OP_CMD_STOP)) {
ret = dict_allocate_and_serialize (dict,
&req.dict.dict_val,
@@ -2927,7 +2925,10 @@ gf_cli3_1_remove_brick (call_frame_t *frame, xlator_t *this,
goto out;
}
- cmd |= GF_DEFRAG_CMD_STATUS;
+ if (command == GF_OP_CMD_STATUS)
+ cmd |= GF_DEFRAG_CMD_STATUS;
+ else
+ cmd |= GF_DEFRAG_CMD_STOP;
ret = dict_set_int32 (req_dict, "rebalance-command", (int32_t) cmd);
if (ret) {