From 946eecfff75d7c9f4df3890ce57311386fe6e994 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Fri, 17 Oct 2014 10:58:06 +0000 Subject: protocol/client: change log level for lookup Problem: On 3.5 branch, http://review.gluster.org/8294 causes the server to return ENOENT (as opposed to ESTALE in master branch) if file does not exist. When AFR does entry self-heals (either from the mount or shd or by the `heal info` command), it does a gfid-lookup with loc.name == NULL, causing the corresponding log file to be flooded with messages like this: [2014-10-15 11:12:57.405428] W [client-rpc-fops.c:2761:client3_3_lookup_cbk] 0-testvol-client-1: remote operation failed: No such file or directory. Path: (760b4427-2fb9-4a67-9f55-e8e8d78e452f) Fix: Change log level for ENOENT and ESTALE errors to DEBUG Change-Id: Ideb88d9cb609d077e02efe703cd28155985d7513 BUG: 1153904 Signed-off-by: Ravishankar N Reviewed-on: http://review.gluster.org/8937 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Niels de Vos --- xlators/protocol/client/src/client-rpc-fops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index 3bd1206e4d0..3c014915ef5 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -2766,14 +2766,16 @@ out: rsp.op_errno = op_errno; if (rsp.op_ret == -1) { /* any error other than ENOENT */ - if (!(local->loc.name && rsp.op_errno == ENOENT) && - !(rsp.op_errno == ESTALE)) + if ((rsp.op_errno != ENOENT) && (rsp.op_errno != ESTALE)) gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s. Path: %s (%s)", strerror (rsp.op_errno), local->loc.path, loc_gfid_utoa (&local->loc)); else - gf_log (this->name, GF_LOG_TRACE, "not found on remote node"); + gf_log (this->name, GF_LOG_DEBUG, + "remote operation failed: %s. Path: %s (%s)", + strerror (rsp.op_errno), local->loc.path, + loc_gfid_utoa (&local->loc)); } -- cgit