summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rebalance.c
diff options
context:
space:
mode:
authorHari Gowtham <hgowtham@redhat.com>2015-07-23 14:44:04 +0530
committerDan Lambright <dlambrig@redhat.com>2015-07-29 09:19:51 -0700
commit5a9a903a9a3b1d234dfaf45eb1bad7930a2aafd4 (patch)
treef3c5e7fa02e2a087ed328520a42672e399d1b8d0 /xlators/mgmt/glusterd/src/glusterd-rebalance.c
parentea90c92820ee0ca500345863cdfb5009d08b6ca7 (diff)
tiering: Error message change for detach-tier non tier volume
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>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c18
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 c4674f56c33..501cf375b4b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -735,11 +735,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;