From c9d7d1e8975bad63811e32c5289a144b734c9ab2 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" 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 --- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 612ab921d64..8cb2bb33f4c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -1862,10 +1862,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