17b94a
From 17940583c4d991a568582581f68dcbf08463ccaf Mon Sep 17 00:00:00 2001
17b94a
From: Susant Palai <spalai@redhat.com>
17b94a
Date: Tue, 16 Jul 2019 10:31:46 +0530
17b94a
Subject: [PATCH 334/335] dht: log getxattr failure for node-uuid at "DEBUG"
17b94a
17b94a
There are two ways to fetch node-uuid information from dht.
17b94a
17b94a
1 - #define GF_XATTR_LIST_NODE_UUIDS_KEY "trusted.glusterfs.list-node-uuids"
17b94a
This key is used by AFR.
17b94a
17b94a
2 - #define GF_REBAL_FIND_LOCAL_SUBVOL "glusterfs.find-local-subvol"
17b94a
This key is used for non-afr volume type.
17b94a
17b94a
We do two getxattr operations. First on the #1 key followed by on #2 if
17b94a
getxattr on #1 key fails.
17b94a
17b94a
Since the parent function "dht_init_local_subvols_and_nodeuuids" logs failure,
17b94a
moving the log-level to DEBUG in dht_find_local_subvol_cbk.
17b94a
17b94a
>fixes: bz#1730175
17b94a
>Change-Id: I4d88244dc26587b111ca5b00d4c00118efdaac14
17b94a
>Signed-off-by: Susant Palai <spalai@redhat.com>
17b94a
Upstream patch: https://review.gluster.org/#/c/glusterfs/+/23053/
17b94a
17b94a
BUG: 1727755
17b94a
Change-Id: I4d88244dc26587b111ca5b00d4c00118efdaac14
17b94a
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/185876
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
---
17b94a
 xlators/cluster/dht/src/dht-common.c | 7 +++++--
17b94a
 1 file changed, 5 insertions(+), 2 deletions(-)
17b94a
17b94a
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
17b94a
index 37952ba..d0b5287 100644
17b94a
--- a/xlators/cluster/dht/src/dht-common.c
17b94a
+++ b/xlators/cluster/dht/src/dht-common.c
17b94a
@@ -4253,8 +4253,11 @@ dht_find_local_subvol_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
17b94a
             local->op_ret = -1;
17b94a
             local->op_errno = op_errno;
17b94a
             UNLOCK(&frame->lock);
17b94a
-            gf_msg(this->name, GF_LOG_ERROR, op_errno, DHT_MSG_GET_XATTR_FAILED,
17b94a
-                   "getxattr err for dir");
17b94a
+            if (op_errno == ENODATA)
17b94a
+                gf_msg_debug(this->name, 0, "failed to get node-uuid");
17b94a
+            else
17b94a
+                gf_msg(this->name, GF_LOG_ERROR, op_errno,
17b94a
+                       DHT_MSG_GET_XATTR_FAILED, "failed to get node-uuid");
17b94a
             goto post_unlock;
17b94a
         }
17b94a
 
17b94a
-- 
17b94a
1.8.3.1
17b94a