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