From 7c0d35b2e7e234084d0414b3cf1e09969a43a677 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 27 Dec 2012 15:57:13 +0530 Subject: glusterd: harden 'volume start' staging to check for brick dirs' presence PROBLEM: When the brick directory of a volume is absent on any of the servers, AND an attempt is made to start the volume, commit fails ONLY on the node where the brick dir is absent, leading to a split-brain like situation. FIX: Harden 'volume start' to check for the presence of brick directories at the time of staging, thereby preventing commit failure. Change-Id: I67faeb9afbd3aa76f08645924462db126bf7a977 BUG: 889996 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/4365 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/bugs/bug-889996.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/bugs/bug-889996.t (limited to 'tests/bugs/bug-889996.t') diff --git a/tests/bugs/bug-889996.t b/tests/bugs/bug-889996.t new file mode 100644 index 000000000..6b07d8918 --- /dev/null +++ b/tests/bugs/bug-889996.t @@ -0,0 +1,19 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume info; + +TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2}; + +rm -rf $B0/${V0}1; + +TEST ! $CLI volume start $V0; +EXPECT 0 online_brick_count; + +cleanup; -- cgit