From 786343abca3474ff01aa1017210112d97cbc4843 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 4 Sep 2017 16:57:25 +0530 Subject: cluster/afr: Fail open on split-brain Problem: Append on a file with split-brain succeeds. Open is intercepted by open-behind, when write comes on the file, open-behind does open+write. Open succeeds because afr doesn't fail it. Then write succeeds because write-behind intercepts it. Flush is also intercepted by write-behind, so the application never gets to know that the write failed. Fix: Fail open on split-brain, so that when open-behind does open+write open fails which leads to write failure. Application will know about this failure. Change-Id: I4bff1c747c97bb2925d6987f4ced5f1ce75dbc15 BUG: 1294051 Signed-off-by: Pranith Kumar K --- tests/bugs/nfs/bug-974972.t | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/bugs/nfs') diff --git a/tests/bugs/nfs/bug-974972.t b/tests/bugs/nfs/bug-974972.t index d05e7df1a9f..7047825b3d4 100755 --- a/tests/bugs/nfs/bug-974972.t +++ b/tests/bugs/nfs/bug-974972.t @@ -11,6 +11,7 @@ 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 set $V0 cluster.eager-lock off TEST $CLI volume set $V0 nfs.disable false TEST $CLI volume start $V0 EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available; -- cgit