summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-05-02 17:31:07 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-08 21:27:45 -0700
commit2676c402bc47ee89b763393e496a013e82d76e54 (patch)
tree78b1d930ec38025b97bbf5d2489d4229bd66c3ce /xlators/mgmt
parente561935d0153f00f2ddacde093c12284affe9538 (diff)
cli/tiering: Enhance cli output for tiering
Fix for handling cli output for attach-tier and detach-tier Change-Id: I4d17f4b09612754fe1b8cec6c2e14927029b9678 BUG: 1211562 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/10284 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index d21a7341570..42927108f08 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -1738,10 +1738,12 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr)
}
case GF_OP_CMD_STOP:
+ case GF_OP_CMD_STOP_DETACH_TIER:
ret = 0;
break;
case GF_OP_CMD_COMMIT:
+ case GF_OP_CMD_DETACH_COMMIT:
if (volinfo->decommission_in_progress) {
errstr = gf_strdup ("use 'force' option as migration "
"is in progress");
@@ -1791,7 +1793,6 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr)
break;
- case GF_OP_CMD_DETACH_COMMIT:
case GF_OP_CMD_DETACH_COMMIT_FORCE:
case GF_OP_CMD_COMMIT_FORCE:
break;
@@ -2081,6 +2082,7 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr)
goto out;
case GF_OP_CMD_STOP:
+ case GF_OP_CMD_STOP_DETACH_TIER:
{
/* Fall back to the old volume file */
cds_list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks,
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;