summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
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-21 10:56:45 -0700
commitdc0406c3422c7d3a901b977978b400d77d6dd7ec (patch)
tree850b07c14cdd578aef10afa0a027e812df54a2c1 /xlators/mgmt/glusterd/src/glusterd-handler.c
parent9b3a1d1c51df28e3a0301082819c78fae0e8fb68 (diff)
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 <ggarg@redhat.com> >> 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> (cherry picked from commit f44232e6a18a4b79e680ea0b6322269b84fa6813) Change-Id: Ic7a35eb46099ab7456e04b7bae98c24416ec6651 Reviewed-on: http://review.gluster.org/13639 Tested-by: Gaurav Kumar Garg <ggarg@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-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 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: