summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2014-04-14 14:51:28 +0530
committerVijay Bellur <vbellur@redhat.com>2014-05-02 08:55:04 -0700
commite14b100da9801f6f694763eae47e5412982856f0 (patch)
tree6bfd02df0480fe7b2ed02b19cc3d7cac9352d5d5
parent4044e387dd40e2d12145fd32d5fd715406fcec8e (diff)
glusterd: avoid repetitive logging of disconnect messages
NFS/SHD process disconnecting from glusterd, when the respective service are down, would lead to repeated logging of disconnect related messages, owing to the rpc reconnect logic in glusterfs(d). This patch addresses that by logging the disconnect only on the first disconnect event. Change-Id: I4008d2436721f4ba093270df4ccb3fc885f22ca0 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/7468 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 0a43fd69ae5..6eb85d72af4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4115,7 +4115,7 @@ __glusterd_brick_rpc_notify (struct rpc_clnt *rpc, void *mydata,
break;
case RPC_CLNT_DISCONNECT:
- if (GF_BRICK_STARTED == brickinfo->status)
+ if (glusterd_is_brick_started (brickinfo))
gf_log (this->name, GF_LOG_INFO, "Disconnected from "
"%s:%s", brickinfo->hostname, brickinfo->path);
@@ -4171,8 +4171,11 @@ __glusterd_nodesvc_rpc_notify (struct rpc_clnt *rpc, void *mydata,
break;
case RPC_CLNT_DISCONNECT:
- gf_log (this->name, GF_LOG_DEBUG, "got RPC_CLNT_DISCONNECT");
- (void) glusterd_nodesvc_set_online_status (server, _gf_false);
+ if (glusterd_is_nodesvc_online (server)) {
+ gf_log (this->name, GF_LOG_DEBUG,
+ "got RPC_CLNT_DISCONNECT");
+ (void) glusterd_nodesvc_set_online_status (server, _gf_false);
+ }
break;
default: