summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2015-11-23 11:58:52 +0530
committerDan Lambright <dlambrig@redhat.com>2015-11-26 05:29:41 -0800
commit7d95955cd2b2b8979e66bcf09e792a34a12bd8a3 (patch)
tree3fc41f2fe47bb2a1362b7a6f8b37e6f3558e1575 /xlators/mgmt
parent789803ce16409a1f9ce84c0f9a60e68bd630380e (diff)
Tiering: change of error message for "v tier <vname> detach status"
If the volume was not a tiered volume then empty status was being printed instead of an error message. Change-Id: I13ccb16e1562966976a48d9365ced4c8a124de59 BUG: 1284357 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12713 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 25349506f58..bb477a7c9f2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -735,6 +735,14 @@ glusterd_op_stage_rebalance (dict_t *dict, char **op_errstr)
goto out;
}
}
+ if (strstr(cmd_str, "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 (strstr(cmd_str, "detach-tier") != NULL) {
if (volinfo->type != GF_CLUSTER_TYPE_TIER) {
snprintf (msg, sizeof(msg), "volume %s is not "