summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2014-09-18 04:21:04 -0400
committerRaghavendra Bhat <raghavendra@redhat.com>2015-01-06 01:39:15 -0800
commitbb1601b94039b27b5a148479b61895a100ce8e6d (patch)
treee0ec227bdf0c487855958ce9d8bf61bc41ab54d1 /xlators/mgmt
parent707ef16edcf4b14f46bb515b3464fa4368ce9b7c (diff)
rdma:rdma fuse mount hangs for tcp,rdma volumes if brick is down.
Backport of http://review.gluster.org/8762 When we try to mount a tcp,rdma volume as rdma transport using FUSE protocol, then mount will hang if the brick is down. When we kill a process, signal will be received in glusterfsd process and it will call pmap_signout with port listening on tcp only. In case of the tcp,rdma there will be two ports, and port which is listening for rdma will not called for sign out. So the mount process will try to connect to a port which is not open and it will keep trying to connect. This patch will call pmap_signout for rdma port also, So when mount tries to get the brick port,it will fail. Change-Id: I73f90d7340afa3b0b1278924206f1488e4094a62 BUG: 1166515 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/8762 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/9176 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-pmap.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.c b/xlators/mgmt/glusterd/src/glusterd-pmap.c
index a54a87b1d33..e4dacb80c4a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-pmap.c
+++ b/xlators/mgmt/glusterd/src/glusterd-pmap.c
@@ -438,9 +438,10 @@ gluster_pmap_signin (rpcsvc_request_t *req)
int
__gluster_pmap_signout (rpcsvc_request_t *req)
{
- pmap_signout_req args = {0,};
- pmap_signout_rsp rsp = {0,};
- int ret = -1;
+ pmap_signout_req args = {0,};
+ pmap_signout_rsp rsp = {0,};
+ int ret = -1;
+ char brick_path[PATH_MAX] = {0,};
glusterd_brickinfo_t *brickinfo = NULL;
ret = xdr_to_generic (req->msg[0], &args,
@@ -456,14 +457,21 @@ __gluster_pmap_signout (rpcsvc_request_t *req)
ret = glusterd_get_brickinfo (THIS, args.brick, args.port, _gf_true,
&brickinfo);
+ if (args.rdma_port) {
+ snprintf(brick_path, PATH_MAX, "%s.rdma", args.brick);
+ rsp.op_ret = pmap_registry_remove (THIS, args.rdma_port,
+ brick_path, GF_PMAP_PORT_BRICKSERVER,
+ req->trans);
+ }
+
+ if (!ret)
+ glusterd_brick_update_signin (brickinfo, _gf_false);
+
fail:
glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_pmap_signout_rsp);
free (args.brick);//malloced by xdr
- if (!ret)
- glusterd_brick_update_signin (brickinfo, _gf_false);
-
return 0;
}