autobuild v3.12.2-38

Resolves: bz#1664235
Signed-off-by: Milind Changire <mchangir@redhat.com>
This commit is contained in:
Milind Changire 2019-01-18 07:24:35 +05:30
parent dfef94e4a2
commit 9331203056
2 changed files with 83 additions and 1 deletions

View File

@ -0,0 +1,78 @@
From 83b57d7278f2c6f493042e3ea34f104822823137 Mon Sep 17 00:00:00 2001
From: Sunny Kumar <sunkumar@redhat.com>
Date: Mon, 14 Jan 2019 11:48:55 +0530
Subject: [PATCH 507/507] geo-rep : fix rename sync on hybrid crawl
Problem: When geo-rep is configured as hybrid crawl
directory renames are not synced to the slave.
Solution: Rename sync of directory was failing due to incorrect
destination path calculation.
During check for existence on slave we miscalculated
realpath. <host:brickpath/dir>.
Change-Id: I23f1ea60e86a917598fe869d5d24f8da654d8a0a
BUG: 1664235
>Upstream Patch: https://review.gluster.org/#/c/glusterfs/+/22020/
>fixes: bz#1665826
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Change-Id: I0588e38f803cc44a2f044c04563246fcb6aaebec
Reviewed-on: https://code.engineering.redhat.com/gerrit/160876
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
---
geo-replication/syncdaemon/resource.py | 2 ++
geo-replication/syncdaemon/syncdutils.py | 22 +++++++++-------------
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index f16066e76..23e509c76 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -656,6 +656,8 @@ class Server(object):
logging.info(lf("Special case: rename on mkdir",
gfid=gfid, entry=repr(entry)))
src_entry = get_slv_dir_path(slv_host, slv_volume, gfid)
+ if src_entry is None:
+ collect_failure(e, ENOENT, uid, gid)
if src_entry is not None and src_entry != entry:
slv_entry_info = {}
slv_entry_info['gfid_mismatch'] = False
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
index 32181925d..ec987bdb1 100644
--- a/geo-replication/syncdaemon/syncdutils.py
+++ b/geo-replication/syncdaemon/syncdutils.py
@@ -695,19 +695,15 @@ def get_slv_dir_path(slv_host, slv_volume, gfid):
gfid[2:4],
gfid], [ENOENT], [ESTALE])
if dir_path != ENOENT:
- break
-
- if not isinstance(dir_path, int):
- realpath = errno_wrap(os.readlink, [dir_path],
- [ENOENT], [ESTALE])
-
- if not isinstance(realpath, int):
- realpath_parts = realpath.split('/')
- pargfid = realpath_parts[-2]
- basename = realpath_parts[-1]
- pfx = gauxpfx()
- dir_entry = os.path.join(pfx, pargfid, basename)
- return dir_entry
+ realpath = errno_wrap(os.readlink, [dir_path],
+ [ENOENT], [ESTALE])
+ if not isinstance(realpath, int):
+ realpath_parts = realpath.split('/')
+ pargfid = realpath_parts[-2]
+ basename = realpath_parts[-1]
+ pfx = gauxpfx()
+ dir_entry = os.path.join(pfx, pargfid, basename)
+ return dir_entry
return None
--
2.20.1

View File

@ -192,7 +192,7 @@ Release: 0.1%{?prereltag:.%{prereltag}}%{?dist}
%else
Name: glusterfs
Version: 3.12.2
Release: 37%{?dist}
Release: 38%{?dist}
%endif
License: GPLv2 or LGPLv3+
Group: System Environment/Base
@ -771,6 +771,7 @@ Patch0503: 0503-core-brick-process-is-crashed-at-the-time-of-spawn-t.patch
Patch0504: 0504-dht-Add-NULL-check-for-stbuf-in-dht_rmdir_lookup_cbk.patch
Patch0505: 0505-features-shard-Fix-launch-of-multiple-synctasks-for-.patch
Patch0506: 0506-features-shard-Assign-fop-id-during-background-delet.patch
Patch0507: 0507-geo-rep-fix-rename-sync-on-hybrid-crawl.patch
%description
GlusterFS is a distributed file-system capable of scaling to several
@ -2731,6 +2732,9 @@ fi
%endif
%changelog
* Fri Jan 18 2019 Milind Changire <mchangir@redhat.com> - 3.12.2-38
- fixes bugs bz#1664235
* Mon Jan 14 2019 Milind Changire <mchangir@redhat.com> - 3.12.2-37
- fixes bugs bz#1662059 bz#1662828 bz#1664529