diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-05-19 14:48:01 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2015-06-01 21:24:00 -0700 |
commit | efdb183c62be68f1a371237d1caac4347288f538 (patch) | |
tree | c620f25a22d80de6e42f1f8a16fea8483fd9b277 /rpc | |
parent | f266dc6be5b401a7a813adc958d978eb9207cd63 (diff) |
glusterd: fix repeated connection to nfssvc failed msgs
... and disable reconnect timer on rpc_clnt_disconnect.
Root Cause
----------
gluster-NFS service wouldn't be started if there are no
started volumes that have nfs service enabled for them.
Before this fix we would initiate a connect even when
the gluster-NFS service wasn't (re)started. Compounding
that glusterd_conn_disconnect doesn't disable reconnect
timer. So, it is possible that the reconnect timer was
in execution when the timer event was attempted to be
removed.
Change-Id: Iadcb5cff9eafefa95eaf3a1a9413eeb682d3aaac
BUG: 1222065
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/10830
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/10963
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 264a3120a46..db99484cb81 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -1108,6 +1108,11 @@ rpc_clnt_start (struct rpc_clnt *rpc) conn = &rpc->conn; + pthread_mutex_lock (&conn->lock); + { + rpc->disabled = 0; + } + pthread_mutex_unlock (&conn->lock); rpc_clnt_reconnect (conn); return 0; @@ -1758,6 +1763,7 @@ rpc_clnt_disconnect (struct rpc_clnt *rpc) pthread_mutex_lock (&conn->lock); { + rpc->disabled = 1; if (conn->timer) { gf_timer_call_cancel (rpc->ctx, conn->timer); conn->timer = NULL; |