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