summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavishankar N <root@ravi3.(none)>2014-10-17 10:58:06 +0000
committerNiels de Vos <ndevos@redhat.com>2014-10-21 08:41:25 -0700
commit946eecfff75d7c9f4df3890ce57311386fe6e994 (patch)
treed5540b09a6e196ae1e2b2064eaa650e14c22e56e
parent4f58e62ce5787303ced4e11ba15d5ce8f07c379f (diff)
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: <gfid:760b4427-2fb9-4a67-9f55-e8e8d78e452f> (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 <root@ravi3.(none)> Reviewed-on: http://review.gluster.org/8937 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c8
1 files 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));
}