summaryrefslogtreecommitdiffstats
path: root/tests/thin-arbiter.rc
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2019-05-21 10:58:44 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2019-05-24 15:00:28 +0000
commitf6c0b59725615da10435c40fec0f26dae542de74 (patch)
treeb5ebd98ba71c8da48a09cb26bc987f22d09fee21 /tests/thin-arbiter.rc
parent0b83b8af60916dcdb850f15da7e7b406809dd1d5 (diff)
tests: Fix spurious failures in ta-write-on-bad-brick.t
Problem: afr_child_up_status_meta works only when LOOKUP on $M0 is successful. There are cases where quorum is not met and LOOKUP fails on $M0 which leads to failures similar to: grep: /mnt/glusterfs/0/.meta/graphs/active/patchy-replicate-0/private: Transport endpoint is not connected This was happening once in a while based on attribute-timeout and md-cache not serving the lookup. Fix: Find child-up status based on statedump instead. Also changed mount options to include --entry-timeout=0 and --attribute-timeout=0 updates bz#1193929 Change-Id: Ic0de72c3006d7399a5feb3e4d10d4748949b2ab3 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'tests/thin-arbiter.rc')
-rw-r--r--tests/thin-arbiter.rc22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/thin-arbiter.rc b/tests/thin-arbiter.rc
index 72202ee..29edeb1 100644
--- a/tests/thin-arbiter.rc
+++ b/tests/thin-arbiter.rc
@@ -173,7 +173,7 @@ function ta_start_mount_process()
{
mkdir -p $1
identifier=$(echo $1 | tr / .)
- if glusterfs -p $B0/${identifier}.pid --volfile=$B0/mount.vol $1
+ if glusterfs --entry-timeout=0 --attribute-timeout=0 -p $B0/${identifier}.pid --volfile=$B0/mount.vol $1
then
cat $B0/$identifier.pid
else
@@ -182,6 +182,13 @@ function ta_start_mount_process()
fi
}
+function ta_get_mount_pid()
+{
+ local mount_path=$1
+ identifier=$(echo $mount_path | tr / .)
+ cat $B0/${identifier}.pid
+}
+
function ta_create_mount_volfile()
{
local b0=$B0/$1
@@ -607,3 +614,16 @@ function ta_start_shd_process()
return 1
fi
}
+
+function ta_mount_child_up_status()
+{
+ local mount_path=$1
+ #brick_id is (brick-num in volume info - 1)
+ local vol=$2
+ local brick_id=$3
+ local pid=$(ta_get_mount_pid $mount_path)
+ local fpath=$(generate_statedump $pid)
+ up=$(grep -a -B1 trusted.afr.$vol-client-$brick_id $fpath | head -1 | cut -f2 -d'=')
+ rm -f $fpath
+ echo "$up"
+}