summaryrefslogtreecommitdiffstats
path: root/tests/geo-rep.rc
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-09-21 14:51:13 +0530
committerVenky Shankar <vshankar@redhat.com>2015-11-27 03:54:51 -0800
commit8b3061887319d38eb3644e5c4ec5a2b226de6723 (patch)
tree72a10196dfaea1b6724c10df291553fcc56d1cc3 /tests/geo-rep.rc
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 <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12205 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/12729 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'tests/geo-rep.rc')
-rw-r--r--tests/geo-rep.rc10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/geo-rep.rc b/tests/geo-rep.rc
index 208069c6918..e811f9a5b76 100644
--- a/tests/geo-rep.rc
+++ b/tests/geo-rep.rc
@@ -58,6 +58,16 @@ function create_data()
# Rename - Dir
mv ${master_mnt}/${prefix}_d3 ${master_mnt}/${prefix}_d4
+
+ # chown
+ touch ${master_mnt}/${prefix}_chown_f1
+ chown 1000:1000 ${master_mnt}/${prefix}_chown_f1
+}
+
+function chown_file_ok()
+{
+ local file_owner=$(stat --format "%u:%g" "$1" 2>/dev/null)
+ if test "X$file_owner" != "X1000:1000"; then return 1;fi
}
function regular_file_ok()