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