summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2016-12-13 15:28:42 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-12-21 20:49:19 -0800
commitaf6769675acbbfd780fa2ece8587502d6d579372 (patch)
treee464f44c08163b9ba84e3d91d1e9d71efd5c04dc /xlators/mgmt
parent8b42e1b5688f8600086ecc0e33ac4abf5e7c2772 (diff)
socket: socket disconnect should wait for poller thread exit
When SSL is enabled or if "transport.socket.own-thread" option is set then socket_poller is run as different thread. Currently during disconnect or PARENT_DOWN scenario we don't wait for this thread to terminate. PARENT_DOWN will disconnect the socket layer and cleanup resources used by socket_poller. Therefore before disconnect we should wait for poller thread to exit. Change-Id: I71f984b47d260ffd979102f180a99a0bed29f0d6 BUG: 1404181 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/16141 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handshake.c7
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
index dc772ca6f51..550ee2c10b3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
@@ -1824,7 +1824,7 @@ __glusterd_mgmt_hndsk_version_ack_cbk (struct rpc_req *req, struct iovec *iov,
out:
if (ret != 0 && peerinfo)
- rpc_transport_disconnect (peerinfo->rpc->conn.trans);
+ rpc_transport_disconnect (peerinfo->rpc->conn.trans, _gf_false);
rcu_read_unlock ();
@@ -1949,7 +1949,8 @@ out:
frame->local = NULL;
STACK_DESTROY (frame->root);
if (peerinfo)
- rpc_transport_disconnect (peerinfo->rpc->conn.trans);
+ rpc_transport_disconnect (peerinfo->rpc->conn.trans,
+ _gf_false);
}
rcu_read_unlock ();
@@ -2218,7 +2219,7 @@ __glusterd_peer_dump_version_cbk (struct rpc_req *req, struct iovec *iov,
out:
if (ret != 0 && peerinfo)
- rpc_transport_disconnect (peerinfo->rpc->conn.trans);
+ rpc_transport_disconnect (peerinfo->rpc->conn.trans, _gf_false);
rcu_read_unlock ();
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index fedfb746c50..a1c9132feda 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -4059,7 +4059,8 @@ gd_check_and_update_rebalance_info (glusterd_volinfo_t *old_volinfo,
//Disconnect from rebalance process
if (glusterd_defrag_rpc_get (old->defrag)) {
- rpc_transport_disconnect (old->defrag->rpc->conn.trans);
+ rpc_transport_disconnect (old->defrag->rpc->conn.trans,
+ _gf_false);
glusterd_defrag_rpc_put (old->defrag);
}