diff options
author | hari gowtham <hgowtham@redhat.com> | 2016-09-09 12:26:52 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2016-09-13 12:24:28 -0700 |
commit | eaf9c1b314f1abf0ab4e3ddec37bf24490f4d716 (patch) | |
tree | afd67c6fe3434ab9ec1d9743f2664e1e89bb6ee9 /xlators/mgmt/glusterd | |
parent | 972eb0104f2b93207200c7c3761e65fef589069c (diff) |
Tier: failing detach commit on detach failure and in-progress
back-port of: http://review.gluster.org/#/c/15438/
PROBLEM: if detach status has failed or if it remains in progress
we allow detach commit to happen. only detach force should
be allowed.
FIX: check the detach status for failure or inprogress and disallow
with the apt error message.
>Change-Id: Ib97d540fec67717bb55c18d133187c665cf69ef1
>BUG: 1374584
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Reviewed-on: http://review.gluster.org/15438
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: hari gowtham <hari.gowtham005@gmail.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Change-Id: I932b1074de277361fe7c3fe247d799f772cf4658
BUG: 1375474
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Reviewed-on: http://review.gluster.org/15491
Tested-by: hari gowtham <hari.gowtham005@gmail.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index e99559f9ad2..a08c6a55803 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -2112,6 +2112,17 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr) GD_MSG_VOL_NOT_TIER, "%s", errstr); goto out; } + if (volinfo->decommission_in_progress) { + errstr = gf_strdup ("use 'force' option as migration " + "is in progress"); + goto out; + } + if (volinfo->rebal.defrag_status == GF_DEFRAG_STATUS_FAILED) { + errstr = gf_strdup ("use 'force' option as migration " + "has failed"); + goto out; + } + ret = glusterd_remove_brick_validate_bricks (cmd, brick_count, dict, volinfo, &errstr); |