diff options
author | hari <hgowtham@redhat.com> | 2016-02-19 13:43:48 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2016-03-08 07:50:59 -0800 |
commit | 67704349dff995436ed4db8c8da55648e40c7388 (patch) | |
tree | 3cb0a66d633d1070cc76a2256bbe9d1a41204b42 /xlators/mgmt/glusterd | |
parent | eb377a44040245d171eb5806aa895ec4df549f73 (diff) |
Tier: making detach start fail when brick on hot tier is down
backport of : http://review.gluster.org/#/c/13474/6
Currently detach tier start happens even when a hot brick is down
this might lead to data loss.
This patch prevents the detach tier start from being executed
successfully if a brick in hot tier is down
>Change-Id: I3b6047a44bd01b8a6887d41f799f64de6bf075ef
>BUG: 1309999
>Signed-off-by: hari <hgowtham@redhat.com>
Change-Id: Ica0ae72f8e30156090be43e428545d684bdea36b
BUG: 1314617
Signed-off-by: hari <hgowtham@redhat.com>
Reviewed-on: http://review.gluster.org/13602
Smoke: Gluster Build System <jenkins@build.gluster.com>
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.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 7801d059a3a..99b5261e9c1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -1806,7 +1806,8 @@ glusterd_remove_brick_validate_bricks (gf1_op_commands cmd, int32_t brick_count, } if (glusterd_is_local_brick (THIS, volinfo, brickinfo)) { - if (cmd == GF_OP_CMD_START && + if (((cmd == GF_OP_CMD_START) || + (cmd == GF_OP_CMD_DETACH_START)) && brickinfo->status != GF_BRICK_STARTED) { snprintf (msg, sizeof (msg), "Found stopped " "brick %s", brick); |