summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorRichard Wareing <rwareing@fb.com>2015-09-22 22:55:40 -0700
committerJeff Darcy <jeff@pl.atyp.us>2017-09-08 23:47:02 +0000
commit8250b0bf29d5423bf6014b45b43a22c6aace5576 (patch)
tree7e5cf35002a424b50d1a7911acbd39a3082e6aa1 /tests/bugs
parentbad06a5ce47772d1885dd054dc384af750f0c5da (diff)
cluster/afr: AFR2 Discovery entry heal flow should only happen on root gfid
Summary: - Prevents entry self-heal flow from happening on non-root GFIDs Test Plan: - Run prove -v tests/bugs/fb8149516.t Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2470622 Change-Id: Id8559f2cfeb6e1e5c26dc1571854c0fbc0b59e08 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18250 Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/fb8149516.t17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/bugs/fb8149516.t b/tests/bugs/fb8149516.t
index 54372794c6f..3679ab8f93a 100644
--- a/tests/bugs/fb8149516.t
+++ b/tests/bugs/fb8149516.t
@@ -16,6 +16,8 @@ TEST $CLI volume set $V0 cluster.entry-self-heal off
TEST $CLI volume set $V0 cluster.data-self-heal off
TEST $CLI volume set $V0 cluster.metadata-self-heal off
TEST $CLI volume set $V0 nfs.disable off
+TEST $CLI volume set $V0 nfs.write-size 524288
+TEST $CLI volume set $V0 nfs.read-size 524288
TEST $CLI volume start $V0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
cd $M0
@@ -28,13 +30,20 @@ TEST kill_brick $V0 $H0 $B0/${V0}2
TEST rm -rf $B0/${V0}2/testfile*
TEST rm -rf $B0/${V0}2/.glusterfs
-TEST $CLI volume start $V0 force
+TEST $CLI volume stop $V0
+sleep 5
+TEST $CLI volume start $V0
EXPECT_WITHIN 20 "1" afr_child_up_status_in_shd $V0 2
+EXPECT_WITHIN 30 "0" get_pending_heal_count $V0
# Verify we see all ten files when ls'ing, without the patch this should
# return no files and fail.
-FILE_LIST=($(\ls $M0))
-TEST "((${#FILE_LIST[@]} == 10))"
-EXPECT_WITHIN 30 "0" get_pending_heal_count $V0
+how_many_files () {
+ \ls $M0 2> /dev/null | wc -l
+}
+# Once it's triggered, entry self-heal happens asynchronously and might take
+# a long-ish time before the missing entries appear, but it does complete.
+# To accommodate that, retry for a little while.
+EXPECT_WITHIN 20 "10" how_many_files
cleanup