summaryrefslogtreecommitdiffstats
path: root/tests/geo-rep
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-09-21 14:51:13 +0530
committerVenky Shankar <vshankar@redhat.com>2015-11-08 23:09:08 -0800
commitdc8d65381bbead0a00d045b7040e0cd86d80955b (patch)
tree00dba743a0e8e20648646450e699b60ef3c7b0a8 /tests/geo-rep
parenta37eb179111b848925928009903cc4a98c0781e3 (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. Change-Id: I93e554bf9342397a7660503f5128e9709f8a0cd8 BUG: 1265148 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>
Diffstat (limited to 'tests/geo-rep')
-rw-r--r--tests/geo-rep/georep-basic-dr-rsync.t27
-rw-r--r--tests/geo-rep/georep-basic-dr-tarssh.t23
2 files changed, 28 insertions, 22 deletions
diff --git a/tests/geo-rep/georep-basic-dr-rsync.t b/tests/geo-rep/georep-basic-dr-rsync.t
index bcb31d90c9e..220b4713c69 100644
--- a/tests/geo-rep/georep-basic-dr-rsync.t
+++ b/tests/geo-rep/georep-basic-dr-rsync.t
@@ -75,11 +75,12 @@ TEST hardlink_file_ok ${slave_mnt}/hybrid_f1 ${slave_mnt}/hybrid_hl1 #25
TEST unlink_ok ${slave_mnt}/hybrid_f2
TEST unlink_ok ${slave_mnt}/hybrid_d2
TEST data_ok ${slave_mnt}/hybrid_f1 "HelloWorld!"
+TEST chown_file_ok ${slave_mnt}/hybrid_chown_f1
#Check History Crawl.
-TEST $GEOREP_CLI $master $slave stop
-TEST create_data "history" #30
+TEST $GEOREP_CLI $master $slave stop #30
+TEST create_data "history"
TEST $GEOREP_CLI $master $slave start
sleep 10
EXPECT 2 check_status_num_rows "Active"
@@ -89,37 +90,39 @@ EXPECT 2 check_status_num_rows "Passive"
#data_tests "history"
sleep 15
-TEST regular_file_ok ${slave_mnt}/history_f1
-TEST directory_ok ${slave_mnt}/history_d1 #35
+TEST regular_file_ok ${slave_mnt}/history_f1 #35
+TEST directory_ok ${slave_mnt}/history_d1
TEST rename_ok ${slave_mnt}/history_f3 ${slave_mnt}/history_f4
TEST rename_ok ${slave_mnt}/history_d3 ${slave_mnt}/history_d4
TEST symlink_ok history_f1 ${slave_mnt}/history_sl1
-TEST hardlink_file_ok ${slave_mnt}/history_f1 ${slave_mnt}/history_hl1
-TEST unlink_ok ${slave_mnt}/history_f2 #40
+TEST hardlink_file_ok ${slave_mnt}/history_f1 ${slave_mnt}/history_hl1 #40
+TEST unlink_ok ${slave_mnt}/history_f2
TEST unlink_ok ${slave_mnt}/history_d2
TEST data_ok ${slave_mnt}/history_f1 "HelloWorld!"
+TEST chown_file_ok ${slave_mnt}/history_chown_f1
#Check History Crawl.
-TEST create_data "changelog"
+TEST create_data "changelog" #45
sleep 15
TEST check_status "Changelog Crawl"
#data_tests "changelog"
sleep 15
-TEST regular_file_ok ${slave_mnt}/changelog_f1 #45
+TEST regular_file_ok ${slave_mnt}/changelog_f1
TEST directory_ok ${slave_mnt}/changelog_d1
TEST rename_ok ${slave_mnt}/changelog_f3 ${slave_mnt}/changelog_f4
-TEST rename_ok ${slave_mnt}/changelog_d3 ${slave_mnt}/changelog_d4
+TEST rename_ok ${slave_mnt}/changelog_d3 ${slave_mnt}/changelog_d4 #50
TEST symlink_ok changelog_f1 ${slave_mnt}/changelog_sl1
-TEST hardlink_file_ok ${slave_mnt}/changelog_f1 ${slave_mnt}/changelog_hl1 #50
+TEST hardlink_file_ok ${slave_mnt}/changelog_f1 ${slave_mnt}/changelog_hl1
TEST unlink_ok ${slave_mnt}/changelog_f2
TEST unlink_ok ${slave_mnt}/changelog_d2
-TEST data_ok ${slave_mnt}/changelog_f1 "HelloWorld!"
+TEST data_ok ${slave_mnt}/changelog_f1 "HelloWorld!" #55
+TEST chown_file_ok ${slave_mnt}/changelog_chown_f1
#Stop Geo-rep
TEST $GEOREP_CLI $master $slave stop
#Delete Geo-rep
-TEST $GEOREP_CLI $master $slave delete #55
+TEST $GEOREP_CLI $master $slave delete
cleanup;
diff --git a/tests/geo-rep/georep-basic-dr-tarssh.t b/tests/geo-rep/georep-basic-dr-tarssh.t
index 2985b2e5de0..cf661d08782 100644
--- a/tests/geo-rep/georep-basic-dr-tarssh.t
+++ b/tests/geo-rep/georep-basic-dr-tarssh.t
@@ -80,46 +80,49 @@ TEST hardlink_file_ok ${slave_mnt}/hybrid_f1 ${slave_mnt}/hybrid_hl1
TEST unlink_ok ${slave_mnt}/hybrid_f2
TEST unlink_ok ${slave_mnt}/hybrid_d2
TEST data_ok ${slave_mnt}/hybrid_f1 "HelloWorld!"
+TEST chown_file_ok ${slave_mnt}/hybrid_chown_f1 #30
#Check History Crawl.
-TEST $GEOREP_CLI $master $slave stop #30
+TEST $GEOREP_CLI $master $slave stop
TEST create_data "history"
TEST $GEOREP_CLI $master $slave start
sleep 10
EXPECT 2 check_status_num_rows "Active"
-EXPECT 2 check_status_num_rows "Passive"
+EXPECT 2 check_status_num_rows "Passive" #35
#data_tests "history"
sleep 15
-TEST regular_file_ok ${slave_mnt}/history_f1 #35
+TEST regular_file_ok ${slave_mnt}/history_f1
TEST directory_ok ${slave_mnt}/history_d1
TEST rename_ok ${slave_mnt}/history_f3 ${slave_mnt}/history_f4
TEST rename_ok ${slave_mnt}/history_d3 ${slave_mnt}/history_d4
-TEST symlink_ok history_f1 ${slave_mnt}/history_sl1
-TEST hardlink_file_ok ${slave_mnt}/history_f1 ${slave_mnt}/history_hl1 #40
+TEST symlink_ok history_f1 ${slave_mnt}/history_sl1 #40
+TEST hardlink_file_ok ${slave_mnt}/history_f1 ${slave_mnt}/history_hl1
TEST unlink_ok ${slave_mnt}/history_f2
TEST unlink_ok ${slave_mnt}/history_d2
TEST data_ok ${slave_mnt}/history_f1 "HelloWorld!"
+TEST chown_file_ok ${slave_mnt}/history_chown_f1 #45
#Check History Crawl.
TEST create_data "changelog"
sleep 15
-TEST check_status "Changelog Crawl" #45
+TEST check_status "Changelog Crawl"
#data_tests "changelog"
sleep 15
TEST regular_file_ok ${slave_mnt}/changelog_f1
TEST directory_ok ${slave_mnt}/changelog_d1
-TEST rename_ok ${slave_mnt}/changelog_f3 ${slave_mnt}/changelog_f4
+TEST rename_ok ${slave_mnt}/changelog_f3 ${slave_mnt}/changelog_f4 #50
TEST rename_ok ${slave_mnt}/changelog_d3 ${slave_mnt}/changelog_d4
-TEST symlink_ok changelog_f1 ${slave_mnt}/changelog_sl1 #50
+TEST symlink_ok changelog_f1 ${slave_mnt}/changelog_sl1
TEST hardlink_file_ok ${slave_mnt}/changelog_f1 ${slave_mnt}/changelog_hl1
TEST unlink_ok ${slave_mnt}/changelog_f2
-TEST unlink_ok ${slave_mnt}/changelog_d2
+TEST unlink_ok ${slave_mnt}/changelog_d2 #55
TEST data_ok ${slave_mnt}/changelog_f1 "HelloWorld!"
+TEST chown_file_ok ${slave_mnt}/changelog_chown_f1
#Stop Geo-rep
-TEST $GEOREP_CLI $master $slave stop #55
+TEST $GEOREP_CLI $master $slave stop
#Delete Geo-rep
TEST $GEOREP_CLI $master $slave delete