diff options
-rw-r--r-- | cli/src/cli3_1-cops.c | 3 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c index ee66b165f4e..9e1338cb3eb 100644 --- a/cli/src/cli3_1-cops.c +++ b/cli/src/cli3_1-cops.c @@ -770,6 +770,9 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, if (cmd == GF_DEFRAG_CMD_START) { cli_out ("starting rebalance on volume %s has been %s", volname, (rsp.op_ret) ? "unsuccessful": "successful"); + if (rsp.op_ret && rsp.op_errno == EEXIST) + cli_out ("Rebalance already started on volume %s", + volname); } if (cmd == GF_DEFRAG_CMD_STOP) { if (rsp.op_ret == -1) diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index f3c5b9591b5..b1eed64195f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -412,6 +412,7 @@ glusterd_handle_defrag_volume (rpcsvc_request_t *req) gf_log ("glusterd", GF_LOG_DEBUG, "rebalance on volume %s already started", cli_req.volname); + rsp.op_errno = EEXIST; goto out; } |