summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.c
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2018-02-21 12:46:25 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-03-28 04:27:18 +0000
commita60fc2ddc03134fb23c5ed5c0bcb195e1649416b (patch)
treec4f42085b4c6c6761bf4f3d23a24b8821cf292a8 /xlators/mgmt/glusterd/src/glusterd-syncop.c
parent95601229b8318f015a19d7eff89f73853b684a49 (diff)
glusterd: handling brick termination in brick-mux
Problem: There's a race between the last glusterfs_handle_terminate() response sent to glusterd and the kill that happens immediately if the terminated brick is the last brick. Solution: When it is a last brick for the brick process, instead of glusterfsd killing itself, glusterd will kill the process in case of brick multiplexing. And also changing gf_attach utility accordingly. Change-Id: I386c19ca592536daa71294a13d9fc89a26d7e8c0 fixes: bz#1545048 BUG: 1545048 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 31b08d76adc..e5d4421deb4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -958,7 +958,6 @@ gd_syncop_mgmt_brick_op (struct rpc_clnt *rpc, glusterd_pending_node_t *pnode,
gd1_mgmt_brick_op_req *req = NULL;
int ret = 0;
xlator_t *this = NULL;
- glusterd_brickinfo_t *brickinfo = NULL;
this = THIS;
args.op_ret = -1;
@@ -987,22 +986,6 @@ gd_syncop_mgmt_brick_op (struct rpc_clnt *rpc, glusterd_pending_node_t *pnode,
else
GF_FREE (args.errstr);
}
- if (op == GD_OP_STOP_VOLUME || op == GD_OP_REMOVE_BRICK) {
- if (args.op_ret == 0) {
- brickinfo = pnode->node;
- ret = glusterd_brick_process_remove_brick (brickinfo);
- if (ret) {
- gf_msg ("glusterd", GF_LOG_ERROR, 0,
- GD_MSG_BRICKPROC_REM_BRICK_FAILED,
- "Removing brick %s:%s from brick"
- " process failed",
- brickinfo->hostname,
- brickinfo->path);
- args.op_ret = ret;
- goto out;
- }
- }
- }
if (GD_OP_STATUS_VOLUME == op) {
ret = dict_set_int32 (args.dict, "index", pnode->index);