diff options
Diffstat (limited to 'tests/basic/gfid_unsplit.t')
| -rw-r--r-- | tests/basic/gfid_unsplit.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basic/gfid_unsplit.t b/tests/basic/gfid_unsplit.t index 3fe7a6f140c..0df96bd5ed6 100644 --- a/tests/basic/gfid_unsplit.t +++ b/tests/basic/gfid_unsplit.t @@ -14,6 +14,7 @@ TEST $CLI volume info; TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{1..3}; TEST $CLI volume set $V0 performance.stat-prefetch off TEST $CLI volume set $V0 cluster.choose-local off +TEST $CLI volume set $V0 cluster.quorum-type none TEST $CLI volume set $V0 cluster.self-heal-daemon off TEST $CLI volume set $V0 nfs.disable off #EST $CLI volume set $V0 cluster.favorite-child-by-majority on @@ -44,6 +45,15 @@ GFID_DIR_B3="$B0/${V0}3/.glusterfs/$(getfattr -n trusted.gfid -e hex $B0/${V0}3/ #EST rm -f $B0/${V0}3/splitfile #m -rf $GFID_DIR_B3 +touch $M0/newfile + +# Synthetically force a conservative merge of the directory. We want +# to ensure that conservative merges happen in-spite of GFID mis-matches, +# since we can handle them there's no sense in not doing these. In fact, +# if we stop them it will block GFID split-brain resolution. +setfattr -n trusted.afr.patchy-client-1 -v 0x000000000000000000000002 $B0/${V0}1 +setfattr -n trusted.afr.patchy-client-2 -v 0x000000000000000000000002 $B0/${V0}1 + # Restart the down brick TEST $CLI volume start $V0 force EXPECT_WITHIN 20 "1" afr_child_up_status $V0 0 @@ -56,6 +66,10 @@ sleep 1 # Verify the file is readable TEST dd if=$M0/splitfile of=/dev/null 2>/dev/null +# Verify entry healing happened on the back-end regardless of the +# gfid-splitbrain state of the directory. +TEST stat $B0/${V0}1/splitfile + # Verify the MD5 signature of the file HEALED_MD5=$(md5sum $M0/splitfile | cut -d\ -f1) TEST [ "$MD5" == "$HEALED_MD5" ] |
