From f139283f32e7f3dad7db0b2e3f802f3708084b43 Mon Sep 17 00:00:00 2001 From: hari gowtham Date: Tue, 15 Sep 2015 14:57:24 +0530 Subject: Tiering:Changing error message as detach-tier instead of "remove-brick" backport of : http://review.gluster.org/#/c/12177/ >Change-Id: Id93424a08f601a8d7540d96a47ed2b0497d4a631 >BUG: 1263177 >Signed-off-by: hari gowtham >Reviewed-on: http://review.gluster.org/12177 >Tested-by: NetBSD Build System >Tested-by: Gluster Build System >Reviewed-by: Dan Lambright >Tested-by: Dan Lambright Change-Id: Iec787eec7ece0a88675d25eea9309a5bfc14cd49 BUG: 1258244 Signed-off-by: Hari Gowtham Reviewed-on: http://review.gluster.org/12190 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 08bda17acfa..cea4d26c56b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -1867,10 +1867,19 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr) } if (GLUSTERD_STATUS_STARTED != volinfo->status) { - snprintf (msg, sizeof (msg), "Volume %s needs to be " - "started before remove-brick (you can use " - "'force' or 'commit' to override this " - "behavior)", volinfo->volname); + if (volinfo->type == GF_CLUSTER_TYPE_TIER) { + snprintf (msg, sizeof (msg), "Volume %s needs " + "to be started before detach-tier " + "(you can use 'force' or 'commit' " + "to override this behavior)", + volinfo->volname); + } else { + snprintf (msg, sizeof (msg), "Volume %s needs " + "to be started before remove-brick " + "(you can use 'force' or 'commit' " + "to override this behavior)", + volinfo->volname); + } errstr = gf_strdup (msg); gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_VOL_NOT_STARTED, "%s", errstr); -- cgit