summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurav Kumar Garg <garg.gaurav52@gmail.com>2016-02-29 15:48:58 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-03-08 01:10:27 -0800
commitf44232e6a18a4b79e680ea0b6322269b84fa6813 (patch)
tree28651d75793aed60ba00d49d79ace81adf63928c
parent5b5f03d2665687ab717f123da1266bcd3a83da0f (diff)
glusterd:upon re-peer probe glusterd should not return response to CLI two times
If a node N1 and node N2 is part of the cluster and a node N2 try to reprobe node N1 when N1 is disconnected by any means (for eg: either server is down or glusterd is not running or there is a network outage, or firewall is blocking port number 24007 on which glusterd listen, etc.), then glusterd trying to send back two responses to CLI resulting into a double free and a glusterd crash. With this fix glusterd will send response to cli only once and prevent glusterd crash. Note: glusterd was crashing only when user has done first peer probe with hostname and re-probe with ip-address or vice-versa. Change-Id: I92012b147091cf9129f1fbc17834b3f4d7cb46a0 BUG: 1310677 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13546 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 3971bb56a91..c5d486d00dd 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -3695,6 +3695,7 @@ glusterd_probe_begin (rpcsvc_request_t *req, const char *hoststr, int port,
} else {
glusterd_xfer_cli_probe_resp (req, 0, GF_PROBE_FRIEND, NULL,
(char*)hoststr, port, dict);
+ ret = 0;
}
out: