summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-06-04 14:14:14 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-06-11 00:02:25 -0700
commitfefc8730e2a87db41d5f79c9853a14cab86715e5 (patch)
tree3280be08e5a41a3373fbac76bc52339fbc602fc5 /xlators/mgmt/glusterd/src/glusterd-brick-ops.c
parent5c00a6c8163cc255e777823b99d516dfb5ef114e (diff)
glusterd/tier: glusterd crashed with detach-tier commit force
glusterd crashed when doing "detach-tier commit force" on a non-tiered volume. Change-Id: I884771893bb80bec46ae8642c2cfd7e54ab116a6 BUG: 1228112 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11081 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Joseph Fernandes Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index d8c34b4bfe7..5c0ed1e304c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -1805,6 +1805,13 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr)
break;
case GF_OP_CMD_DETACH_COMMIT_FORCE:
+ if (volinfo->type != GF_CLUSTER_TYPE_TIER) {
+ snprintf (msg, sizeof(msg), "volume %s is not a tier "
+ "volume", volinfo->volname);
+ errstr = gf_strdup (msg);
+ gf_log (this->name, GF_LOG_ERROR, "%s", errstr);
+ goto out;
+ }
case GF_OP_CMD_COMMIT_FORCE:
break;
}