diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 0452f8ccb6b..cf9e0aaa0f2 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -1745,12 +1745,26 @@ gf_cli_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, * case since unlock failures can be highlighted * event though rebalance command was successful */ - snprintf (msg, sizeof (msg), - "Rebalance on %s has been started " - "successfully. Use rebalance status " - "command to check status of the " - "rebalance process.\nID: %s\n%s", - volname, task_id_str, rsp.op_errstr); + + if (cmd == GF_DEFRAG_CMD_START_TIER) { + snprintf (msg, sizeof (msg), + "Attach tier is successful " + "on %s. use tier status to " + "check the status.\nID: %s" + "\n%s", + volname, task_id_str, + rsp.op_errstr); + } else { + snprintf (msg, sizeof (msg), + "Rebalance on %s has been " + "started successfully. Use " + "rebalance status command to" + " check status of the " + "rebalance process.\nID: " + "%s\n%s", volname, + task_id_str, + rsp.op_errstr); + } } else { snprintf (msg, sizeof (msg), "Starting rebalance on volume %s has " @@ -1823,11 +1837,23 @@ done: rsp.op_errstr); else { if (rsp.op_ret) - cli_err ("volume rebalance: %s: failed: %s", volname, - msg); + if (cmd == GF_DEFRAG_CMD_START_TIER) { + cli_err ("Tiering Migration Functionality: %s:" + " failed%s%s", volname, + strlen (msg) ? ": " : "", msg); + } else + cli_err ("volume rebalance: %s: failed%s%s", + volname, strlen (msg) ? ": " : "", + msg); else - cli_out ("volume rebalance: %s: success: %s", volname, - msg); + if (cmd == GF_DEFRAG_CMD_START_TIER) { + cli_out ("Tiering Migration Functionality: %s:" + " success%s%s", volname, + strlen (msg) ? ": " : "", msg); + } else + cli_out ("volume rebalance: %s: success%s%s", + volname, strlen (msg) ? ": " : "", + msg); } ret = rsp.op_ret; |