summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2015-11-02 15:21:19 +0530
committerDan Lambright <dlambrig@redhat.com>2015-11-05 04:36:53 -0800
commit21153927d35d27f3a4eb2f3b2b8e6a98f2438fe2 (patch)
tree90620d2d85bfc8d1afc1e99ab01955fa25aee41b /cli
parentf7895e79a7ced3a6c2143ed4dea94b2121b5a52d (diff)
correction of message displayed after attach tier
back-port of : http://review.gluster.org/#/c/12488/ the message after attach tier is saying rebalance. It is changed according to tiering. >Change-Id: I1834511f86483fa60f404d7defe5be59c025e9d6 >BUG: 1277081 >Signed-off-by: hari gowtham <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/12488 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ibd14e41d0f6e18942b4e60de89760c94d6e45bad BUG: 1277800 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12499 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c46
1 files changed, 36 insertions, 10 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 0452f8c..cf9e0aa 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;