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