From dc0406c3422c7d3a901b977978b400d77d6dd7ec Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Mon, 29 Feb 2016 15:48:58 +0530 Subject: glusterd:upon re-peer probe glusterd should not return response to CLI two times This patch is backport of: http://review.gluster.org/#/c/13546/ 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: 1315626 Signed-off-by: Gaurav Kumar Garg >> Change-Id: I92012b147091cf9129f1fbc17834b3f4d7cb46a0 >> BUG: 1310677 >> Signed-off-by: Gaurav Kumar Garg >> Reviewed-on: http://review.gluster.org/13546 >> Smoke: Gluster Build System >> NetBSD-regression: NetBSD Build System >> CentOS-regression: Gluster Build System >> Reviewed-by: Atin Mukherjee (cherry picked from commit f44232e6a18a4b79e680ea0b6322269b84fa6813) Change-Id: Ic7a35eb46099ab7456e04b7bae98c24416ec6651 Reviewed-on: http://review.gluster.org/13639 Tested-by: Gaurav Kumar Garg Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-handler.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index fd01f0205ab..99e71953f63 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -3696,6 +3696,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: -- cgit