summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2015-05-19 14:48:01 +0530
committerKaushal M <kaushal@redhat.com>2015-06-01 21:24:00 -0700
commitefdb183c62be68f1a371237d1caac4347288f538 (patch)
treec620f25a22d80de6e42f1f8a16fea8483fd9b277 /xlators/mgmt
parentf266dc6be5b401a7a813adc958d978eb9207cd63 (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 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c1
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-nfs-svc.c20
2 files changed, 8 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
index da8c909a14b..fca9323a180 100644
--- a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
@@ -80,7 +80,6 @@ out:
int
glusterd_conn_term (glusterd_conn_t *conn)
{
- rpc_clnt_disable (conn->rpc);
rpc_clnt_unref (conn->rpc);
return 0;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
index 49b1b561701..cb08a208101 100644
--- a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
@@ -164,18 +164,15 @@ glusterd_nfssvc_manager (glusterd_svc_t *svc, void *data, int flags)
{
int ret = -1;
- if (glusterd_are_all_volumes_stopped ()) {
- ret = svc->stop (svc, SIGKILL);
-
- } else {
- ret = glusterd_nfssvc_create_volfile ();
- if (ret)
- goto out;
+ ret = svc->stop (svc, SIGKILL);
+ if (ret)
+ goto out;
- ret = svc->stop (svc, SIGKILL);
- if (ret)
- goto out;
+ ret = glusterd_nfssvc_create_volfile ();
+ if (ret)
+ goto out;
+ if (glusterd_nfssvc_need_start ()) {
ret = svc->start (svc, flags);
if (ret)
goto out;
@@ -193,8 +190,7 @@ out:
int
glusterd_nfssvc_start (glusterd_svc_t *svc, int flags)
{
- if (glusterd_nfssvc_need_start ())
- return glusterd_svc_start (svc, flags, NULL);
+ return glusterd_svc_start (svc, flags, NULL);
return 0;
}