From 21153927d35d27f3a4eb2f3b2b8e6a98f2438fe2 Mon Sep 17 00:00:00 2001 From: hari gowtham Date: Mon, 2 Nov 2015 15:21:19 +0530 Subject: 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 >Reviewed-on: http://review.gluster.org/12488 >Tested-by: Gluster Build System >Reviewed-by: Dan Lambright >Tested-by: Dan Lambright Change-Id: Ibd14e41d0f6e18942b4e60de89760c94d6e45bad BUG: 1277800 Signed-off-by: Hari Gowtham Reviewed-on: http://review.gluster.org/12499 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- cli/src/cli-rpc-ops.c | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'cli') 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; -- cgit