blob: 15deac090e9994c63599ab8529aa9a3f07c06138 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/bash
. $(dirname $0)/../include.rc
. $(dirname $0)/../volume.rc
#This script checks that nfs mount does not fail lookup on files with split-brain
cleanup;
TEST glusterd
TEST pidof glusterd
TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1}
TEST $CLI volume set $V0 self-heal-daemon off
TEST $CLI volume start $V0
sleep 5
TEST mount -t nfs -o vers=3 $H0:/$V0 $N0
TEST touch $N0/1
TEST kill_brick ${V0} ${H0} ${B0}/${V0}1
echo abc > $N0/1
TEST $CLI volume start $V0 force
EXPECT_WITHIN 20 "Y" nfs_up_status
EXPECT_WITHIN 20 "1" afr_child_up_status_in_nfs $V0 0
EXPECT_WITHIN 20 "1" afr_child_up_status_in_nfs $V0 1
TEST kill_brick ${V0} ${H0} ${B0}/${V0}0
echo def > $N0/1
TEST $CLI volume start $V0 force
EXPECT_WITHIN 20 "Y" nfs_up_status
EXPECT_WITHIN 20 "1" afr_child_up_status_in_nfs $V0 0
EXPECT_WITHIN 20 "1" afr_child_up_status_in_nfs $V0 1
#Lookup should not fail
TEST ls $N0/1
TEST ! cat $N0/1
TEST umount $N0
cleanup
|