Blob Blame History Raw
From 6568764e165933d77e20836f1656819d13535d72 Mon Sep 17 00:00:00 2001
From: Jeff Darcy <jdarcy@redhat.com>
Date: Tue, 7 Mar 2017 11:53:04 -0500
Subject: [PATCH 350/361] glusterfsd: don't quit (in client) on connection
 failure

mainline:
> BUG: 1430042
> Reviewed-on: https://review.gluster.org/16866
> 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: Prashanth Pai <ppai@redhat.com>
(cherry picked from commit 37f25b691c8aeb6c52b7214cf685887eb55a48c4)

BUG: 1417815
Change-Id: I32be91e9db361a45454d6340a4c4ac2d0d7efffc
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/101326
Tested-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 glusterfsd/src/glusterfsd-mgmt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 1bbc5c8..0dfa505 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -2123,8 +2123,9 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
                 }
                 server = ctx->cmd_args.curr_server;
                 if (server->list.next == &ctx->cmd_args.volfile_servers) {
-                        //if (!ctx->active)
+                        if (!ctx->active) {
                                 need_term = 1;
+                        }
                         emval = ENOTCONN;
                         GF_LOG_OCCASIONALLY (log_ctr2, "glusterfsd-mgmt",
                                              GF_LOG_INFO,
@@ -2141,8 +2142,9 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
                         gf_log ("glusterfsd-mgmt", GF_LOG_ERROR,
                                 "failed to set remote-host: %s",
                                 server->volfile_server);
-                        //if (!ctx->active)
+                        if (!ctx->active) {
                                 need_term = 1;
+                        }
                         emval = ENOTCONN;
                         break;
                 }
-- 
1.8.3.1