diff options
author | Hari Gowtham <hgowtham@redhat.com> | 2015-07-23 14:44:04 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-07-30 05:24:06 -0700 |
commit | 503155f58960bb410b7f8ad1b8b6b7e1ea46694d (patch) | |
tree | 091c6ec604bda49ae33e51f932d83310148d4aec /xlators/mgmt/glusterd/src | |
parent | 044a5623eb9af8e6f52ed2dd02f0f07d23479638 (diff) |
tiering: Error message change for detach-tier non tier volume
Back port of :
>Change-Id: Ib350b201df14b105e475426d2ec20ff5da39a8a1
>BUG: 1245935
>Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
>Reviewed-on: http://review.gluster.org/11745
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>Tested-by: Gluster Build System <jenkins@build.gluster.com>
>Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
>Reviewed-by: Dan Lambright <dlambrig@redhat.com>
(cherry picked from commit 5a9a903a9a3b1d234dfaf45eb1bad7930a2aafd4)
Change-Id: Ie60d5df395f8643f8b802373a887f2cceba4ad95
BUG: 1248337
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
Reviewed-on: http://review.gluster.org/11800
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 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 7e8246c718a..605b97298c2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -716,11 +716,19 @@ glusterd_op_stage_rebalance (dict_t *dict, char **op_errstr) goto out; } } - if ((strstr(cmd_str, "detach-tier") != NULL) && - (volinfo->rebal.op != GD_OP_REMOVE_BRICK)) { - snprintf (msg, sizeof(msg), "Detach-tier not started."); - ret = -1; - goto out; + if (strstr(cmd_str, "detach-tier") != NULL) { + if (volinfo->type != GF_CLUSTER_TYPE_TIER) { + snprintf (msg, sizeof(msg), "volume %s is not " + "a tier volume.", volinfo->volname); + ret = -1; + goto out; + } + if (volinfo->rebal.op != GD_OP_REMOVE_BRICK) { + snprintf (msg, sizeof(msg), "Detach-tier" + "not started"); + ret = -1; + goto out; + } } break; |