a3470f
From 2a26ea5a3ee33ba5e6baedca8b18e29277ff385a Mon Sep 17 00:00:00 2001
a3470f
From: Sunny Kumar <sunkumar@redhat.com>
a3470f
Date: Tue, 3 Jul 2018 13:58:23 +0530
a3470f
Subject: [PATCH 324/325] dht: delete tier related internal xattr in
a3470f
 dht_getxattr_cbk
a3470f
a3470f
Problem :  Hot and Cold tier brick changelogs report rsync failure
a3470f
a3470f
Solution : georep session is failing to sync directory
a3470f
           from master volume to slave volume due to lot
a3470f
           of changelog retries, solution would be to ignore tier
a3470f
           related internal xattrs trusted.tier.fix.layout.complete and
a3470f
           trusted.tier.tier-dht.commithash in dht_getxattr_cbk.
a3470f
a3470f
Upstream Patch : https://review.gluster.org/#/c/20450/ and
a3470f
                 https://review.gluster.org/#/c/20520/
a3470f
>fixes: bz#1597563
a3470f
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
a3470f
a3470f
Change-Id: I3530ffe7c4157584b439486f33ecd82ed8d66aee
a3470f
BUG: 1581047
a3470f
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/144024
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
a3470f
---
a3470f
 xlators/cluster/dht/src/dht-common.c | 14 ++++++++++++++
a3470f
 1 file changed, 14 insertions(+)
a3470f
a3470f
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
a3470f
index 23049b6..2207708 100644
a3470f
--- a/xlators/cluster/dht/src/dht-common.c
a3470f
+++ b/xlators/cluster/dht/src/dht-common.c
a3470f
@@ -4606,6 +4606,20 @@ dht_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
a3470f
                         dict_del (xattr, conf->mds_xattr_key);
a3470f
                 }
a3470f
 
a3470f
+                /* filter out following two xattrs that need not
a3470f
+                 * be visible on the mount point for geo-rep -
a3470f
+                 * trusted.tier.fix.layout.complete and
a3470f
+                 * trusted.tier.tier-dht.commithash
a3470f
+                 */
a3470f
+
a3470f
+                if (dict_get (xattr, conf->commithash_xattr_name)) {
a3470f
+                        dict_del (xattr, conf->commithash_xattr_name);
a3470f
+                }
a3470f
+
a3470f
+                if (frame->root->pid >= 0 && dht_is_tier_xlator (this)) {
a3470f
+                        dict_del(xattr, GF_XATTR_TIER_LAYOUT_FIXED_KEY);
a3470f
+                }
a3470f
+
a3470f
                 if (frame->root->pid >= 0) {
a3470f
                         GF_REMOVE_INTERNAL_XATTR
a3470f
                                 ("trusted.glusterfs.quota*", xattr);
a3470f
-- 
a3470f
1.8.3.1
a3470f