From e14b100da9801f6f694763eae47e5412982856f0 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Mon, 14 Apr 2014 14:51:28 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/7468 Reviewed-by: Atin Mukherjee Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-handler.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd/src') 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: -- cgit