summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client.c
diff options
context:
space:
mode:
authorVenkatesh Somyajulu <vsomyaju@redhat.com>2013-05-07 13:09:05 +0530
committerVijay Bellur <vbellur@redhat.com>2013-05-28 04:38:25 -0700
commit9e702dd4001ff7937c50aacfe0690e0c40699737 (patch)
treea7577b5d0d484a5d4e0bc359ec552cb1e5fe2db8 /xlators/protocol/client/src/client.c
parent84e966cc8b6ae06699f8a57bc33d509b30ff777b (diff)
protocol/client: Prevent excessive logging of client's "disconnect" messages.
Problem: Currently when gluster volume start force is executed, client process will talk to glusterd to get the port of the brick. But if brick's path is not available it cannot return brick's port. So client process will keep connecting and disconnecting from glusterd for port-query which is ultimately responsible for execssive logging of disconnect messages. Fix: Message will be logged just once at INFO level after the first disconnect from glusterd. Afterwards "disconnect" messages will be logged in DEBUG mode. Change-Id: I2b787f3820b5da45e090c562e5698fcfe24a02cd BUG: 959969 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4953 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client.c')
-rw-r--r--xlators/protocol/client/src/client.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 3b5ecb0aa9e..e24282e285e 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -2092,9 +2092,19 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
client_register_grace_timer (this, conf);
if (!conf->skip_notify) {
- if (conf->connected)
- gf_log (this->name, GF_LOG_INFO,
- "disconnected");
+ if (conf->connected) {
+ gf_log (this->name,
+ ((!conf->disconnect_err_logged)
+ ? GF_LOG_INFO : GF_LOG_DEBUG),
+ "disconnected from %s. Client process "
+ "will keep trying to connect to "
+ "glusterd until brick's port is "
+ "available",
+ conf->rpc->conn.trans->peerinfo.identifier);
+
+ if (conf->portmap_err_logged)
+ conf->disconnect_err_logged = 1;
+ }
/* If the CHILD_DOWN event goes to parent xlator
multiple times, the logic of parent xlator notify