From eeac099cf405849f07989c410968e77f95acdc77 Mon Sep 17 00:00:00 2001 From: Vikhyat Umrao Date: Tue, 12 Nov 2013 18:11:23 +0530 Subject: server/rpc: bricks goes offline and comes back online, with lots of "No such file or directory" log messages Problem: Messages were getting logged very frequently at log level INFO. [2013-03-01 11:34:28.029222] I [server3_1-fops.c:1541:server_open_cbk] vol-server: 993888: OPEN (null) (--) ==> -1 (No such file or directory) [2013-03-01 11:34:28.031579] I [server3_1-fops.c:252:server_inodelk_cbk] vol-server: 993896: INODELK (null) (--) ==> -1 (No such file or directory) [2013-03-01 11:34:28.034041] I [server3_1-fops.c:252:server_inodelk_cbk] vol-server: 993914: INODELK (null) (--) ==> -1 (No such file or directory) [2013-03-01 11:34:28.040435] I [server3_1-fops.c:1338:server_flush_cbk] vol-server: 993938: FLUSH -2 (--) ==> -1 (No such file or directory) Solution: Moved them to DEBUG log level if error number equlas to ENOENT else to ERROR log level. It will help in decreasing the size of log files at INFO log level. For server_open_cbk and for some other functions we already have a patch, below is the URL for it. URL- http://review.gluster.org/6241 This patch solves logging problem for functions server_inodelk_cbk and server_flush_cbk. Change-Id: I57372e851371e466f1674726015e28378b826f5f BUG: 1029372 Signed-off-by: Vikhyat Umrao Reviewed-on: http://review.gluster.org/6252 Reviewed-by: Niels de Vos Tested-by: Gluster Build System --- xlators/protocol/server/src/server-rpc-fops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'xlators') diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 685216f56f9..138e601ce36 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -237,7 +237,8 @@ server_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret < 0) { if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) { - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, (op_errno == ENOENT)? + GF_LOG_DEBUG:GF_LOG_ERROR, "%"PRId64": INODELK %s (%s) ==> (%s)", frame->root->unique, state->loc.path, uuid_utoa (state->resolve.gfid), @@ -1310,10 +1311,11 @@ server_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret < 0) { state = CALL_STATE (frame); - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, (op_errno == ENOENT)? + GF_LOG_DEBUG:GF_LOG_ERROR, "%"PRId64": FLUSH %"PRId64" (%s) ==> (%s)", frame->root->unique, state->resolve.fd_no, - uuid_utoa (state->resolve.gfid), strerror (op_errno)); + uuid_utoa (state->resolve.gfid), strerror (op_errno)); goto out; } -- cgit