e3c68b
From fe1d641e4666f9a20f656b1799cf6e7b75af1279 Mon Sep 17 00:00:00 2001
e3c68b
From: karthik-us <ksubrahm@redhat.com>
e3c68b
Date: Tue, 11 Jun 2019 11:31:02 +0530
e3c68b
Subject: [PATCH 179/192] tests: Fix split-brain-favorite-child-policy.t
e3c68b
 failure
e3c68b
e3c68b
Backport of: https://review.gluster.org/#/c/glusterfs/+/22850/
e3c68b
e3c68b
Problem:
e3c68b
The test case is failing to heal the volume within $HEAL_TIMEOUT @195.
e3c68b
This is happening because as part of split-brain resolution the file
e3c68b
gets expunged from the sink and the new entry mark for that file will
e3c68b
be done on the source bricks as part of impunging. Since the source
e3c68b
bricks shd-threads failed to get the heal-domain lock, they will wait
e3c68b
for the heal-timeout of 10 minutes, which is greater than $HEAL_TIMEOUT.
e3c68b
e3c68b
Fix:
e3c68b
Set the cluster.heal-timeout to 5 seconds to trigger the heal so that
e3c68b
one of the source brick heals the file within the $HEAL_TIMEOUT.
e3c68b
e3c68b
Change-Id: Iae5e819aa564ccde6639c51711f49d1152260c2d
e3c68b
updates: bz#1704562
e3c68b
Signed-off-by: karthik-us <ksubrahm@redhat.com>
e3c68b
Reviewed-on: https://code.engineering.redhat.com/gerrit/172965
e3c68b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e3c68b
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e3c68b
---
e3c68b
 tests/basic/afr/split-brain-favorite-child-policy.t | 7 ++++---
e3c68b
 1 file changed, 4 insertions(+), 3 deletions(-)
e3c68b
e3c68b
diff --git a/tests/basic/afr/split-brain-favorite-child-policy.t b/tests/basic/afr/split-brain-favorite-child-policy.t
e3c68b
index 0e321c6..c268c12 100644
e3c68b
--- a/tests/basic/afr/split-brain-favorite-child-policy.t
e3c68b
+++ b/tests/basic/afr/split-brain-favorite-child-policy.t
e3c68b
@@ -16,6 +16,7 @@ TEST $CLI volume set $V0 cluster.self-heal-daemon off
e3c68b
 TEST $CLI volume set $V0 cluster.entry-self-heal off
e3c68b
 TEST $CLI volume set $V0 cluster.data-self-heal off
e3c68b
 TEST $CLI volume set $V0 cluster.metadata-self-heal off
e3c68b
+TEST $CLI volume set $V0 cluster.heal-timeout 5
e3c68b
 TEST $CLI volume start $V0
e3c68b
 TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
e3c68b
 TEST touch $M0/file
e3c68b
@@ -38,7 +39,7 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
e3c68b
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
e3c68b
 TEST $CLI volume heal $V0
e3c68b
 
e3c68b
-#file fill in split-brain
e3c68b
+#file still in split-brain
e3c68b
 cat $M0/file > /dev/null
e3c68b
 EXPECT "1" echo $?
e3c68b
 
e3c68b
@@ -124,7 +125,7 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
e3c68b
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
e3c68b
 TEST $CLI volume heal $V0
e3c68b
 
e3c68b
-#file fill in split-brain
e3c68b
+#file still in split-brain
e3c68b
 cat $M0/file > /dev/null
e3c68b
 EXPECT "1" echo $?
e3c68b
 
e3c68b
@@ -179,7 +180,7 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
e3c68b
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 2
e3c68b
 TEST $CLI volume heal $V0
e3c68b
 
e3c68b
-#file fill in split-brain
e3c68b
+#file still in split-brain
e3c68b
 cat $M0/file > /dev/null
e3c68b
 EXPECT "1" echo $?
e3c68b
 
e3c68b
-- 
e3c68b
1.8.3.1
e3c68b