summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index a90114ab2b3..24317726079 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -1964,15 +1964,25 @@ glusterd_remove_brick_validate_bricks (gf1_op_commands cmd, int32_t brick_count,
}
if (cmd == GF_OP_CMD_DETACH_COMMIT) {
- snprintf (msg, sizeof (msg), "Brick's in Hot "
- "tier is not decommissioned yet. Use "
- "gluster volume detach-tier <VOLNAME>"
- " <start | commit | force>"
- " command instead");
+ snprintf (msg, sizeof (msg), "Bricks in Hot "
+ "tier are not decommissioned yet. Use "
+ "gluster volume tier <VOLNAME> "
+ "detach start to start the decommission process");
*errstr = gf_strdup (msg);
ret = -1;
goto out;
}
+ } else {
+ if (cmd == GF_OP_CMD_DETACH_COMMIT &&
+ (volinfo->rebal.defrag_status == GF_DEFRAG_STATUS_STARTED)) {
+ snprintf (msg, sizeof (msg), "Bricks in Hot "
+ "tier are not decommissioned yet. Wait for "
+ "the detach to complete using gluster volume "
+ "tier <VOLNAME> status.");
+ *errstr = gf_strdup (msg);
+ ret = -1;
+ goto out;
+ }
}
if (glusterd_is_local_brick (THIS, volinfo, brickinfo)) {
@@ -2237,15 +2247,6 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr)
ret = -1;
goto out;
}
-
- if (volinfo->rebal.defrag_status == GF_DEFRAG_STATUS_STARTED) {
- ret = -1;
- errstr = gf_strdup("Detach is in progress. Please "
- "retry after completion");
- gf_msg (this->name, GF_LOG_ERROR, 0,
- GD_MSG_OIP_RETRY_LATER, "%s", errstr);
- goto out;
- }
break;
case GF_OP_CMD_COMMIT: