path: root/geo-replication
diff options
authorKotresh HR <>2015-09-21 14:51:13 +0530
committerVenky Shankar <>2015-11-27 03:54:51 -0800
commit8b3061887319d38eb3644e5c4ec5a2b226de6723 (patch)
tree72a10196dfaea1b6724c10df291553fcc56d1cc3 /geo-replication
parent7de27f1445ffa7b60a5d8092681267531f50395e (diff)
geo-rep: Fix syncing chown in xsync crawl
GEO-REP INTEROP WITH SHARD FEATURE Problem: The sequence of entry creation and chown in master is recorded as creation of entry with resulted user:group in xsync changelog. During sync, entry creation is always split into two ops, MKNOD and SETATTR. Hence the issue is not being hit otherwise it would have failed with EPERM if parent is owned by different user. But with shard translator being enabled on slave, doing entry creation with MKNOD and SETATTR is not allowed, SETATTR fails as it accesses inode structure which is not linked. Solution: The sequence of entry creation and chown in master should be recorded as MKNOD and SETATTR separately always and do entry creation with single op in gfid-access xlator. The gfid-access patch will be sent separately. BUG: 1284453 Change-Id: Ia577aa5270cb96b86830885d6c4c01fb0133eeed Signed-off-by: Kotresh HR <> Reviewed-on: Tested-by: NetBSD Build System <> Reviewed-by: Aravinda VK <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Milind Changire <> Reviewed-by: Venky Shankar <>
Diffstat (limited to 'geo-replication')
1 files changed, 3 insertions, 5 deletions
diff --git a/geo-replication/syncdaemon/ b/geo-replication/syncdaemon/
index be8449b..7b8dc9d 100644
--- a/geo-replication/syncdaemon/
+++ b/geo-replication/syncdaemon/
@@ -1390,9 +1390,8 @@ class GMasterXsyncMixin(GMasterChangelogMixin):
self.sync_done(self.stimes, False)
self.stimes = []
if stat.S_ISDIR(mo):
- self.write_entry_change("E", [gfid, 'MKDIR', str(mo), str(
- st.st_uid), str(st.st_gid), escape(os.path.join(pargfid,
- bname))])
+ self.write_entry_change("E", [gfid, 'MKDIR', str(mo),
+ str(0), str(0), escape(os.path.join(pargfid, bname))])
self.write_entry_change("M", [gfid, "SETATTR", str(st.st_uid),
str(st.st_gid), str(st.st_mode),
@@ -1422,8 +1421,7 @@ class GMasterXsyncMixin(GMasterChangelogMixin):
if nlink == 1:
[gfid, 'MKNOD', str(mo),
- str(st.st_uid),
- str(st.st_gid),
+ str(0), str(0),
pargfid, bname))])