summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rebalance.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index c14bcd156b4..1566f54695f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -690,6 +690,13 @@ 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;
+ }
+
break;
default:
break;