summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-04-11 15:30:22 +0530
committerVijay Bellur <vijay@gluster.com>2012-04-13 00:46:59 -0700
commitbada6aeb2cabd12a11b0fe17bb01e9f2045b013d (patch)
tree52482d74a792309afd753e0942e561cb0e8eb8bf /cli/src/cli-rpc-ops.c
parentd80846bee0621f591a7b519743e4d91a620ccdca (diff)
glusterd/remove-brick: Replace ABORT with STOP
Remove-brick stop now invokes rebalance stop. This leads to a graceful stop of decommissioning. The volfile is also updated (removal of decommission) Change-Id: I5a8f725c0f54439b810ce32d988c21c02229c703 BUG: 811513 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3126 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c11
1 files changed, 6 insertions, 5 deletions
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) {