summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd
diff options
context:
space:
mode:
authorGaurav Kumar Garg <garg.gaurav52@gmail.com>2016-02-22 17:53:53 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-02-23 07:03:05 -0800
commit794e3e8a7448219e0de303e57b0104896b18746e (patch)
treeb8880e3d42a45af65005a70f5bd214632c643157 /tests/bugs/glusterd
parent9950884e280e393c2c1bdab189ea3aa1716599e8 (diff)
glusterd: volume should not start when server quorum is not met
This patch is backport of: http://review.gluster.org/#/c/13442 Currently when server quorum is not met then upon executing # gluster volume start [force] command its starting the volume. With this patch if server side quorum is not met then it will prevent starting of the volume. >> Change-Id: I39734b2dcf8e90c3c68bf2762d8350aecc82cc38 >> BUG: 1308402 >> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> >> Reviewed-on: http://review.gluster.org/13442 >> Smoke: Gluster Build System <jenkins@build.gluster.com> >> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Iacb65823fb091e4ac250e436d1cb10103bc24921 BUG: 1310632 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13484 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'tests/bugs/glusterd')
-rw-r--r--tests/bugs/glusterd/bug-1177132-quorum-validation.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/bug-1177132-quorum-validation.t b/tests/bugs/glusterd/bug-1177132-quorum-validation.t
index 57aec5ccf57..f18b5a178d3 100644
--- a/tests/bugs/glusterd/bug-1177132-quorum-validation.t
+++ b/tests/bugs/glusterd/bug-1177132-quorum-validation.t
@@ -58,6 +58,24 @@ TEST $CLI_1 volume remove-brick $V0 $H2:$B2/${V0}2 start
TEST $CLI_1 volume set $V0 barrier enable
TEST $CLI_1 volume remove-brick $V0 $H2:$B2/${V0}2 stop
+## Stop the volume
+TEST $CLI_1 volume stop $V0
+
+## Bring down 2nd glusterd
+TEST kill_glusterd 2
+
+## Now quorum is not meet. Starting volume on 1st node should not success
+TEST ! $CLI_1 volume start $V0
+
+## Bring back 2nd glusterd
+TEST $glusterd_2
+
+# After 2nd glusterd come back, there will be 2 nodes in a clusater
+EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count;
+
+## Now quorum is meet. Starting volume on 1st node should be success.
+TEST $CLI_1 volume start $V0
+
# Now re-execute the same profile command and this time it should succeed
TEST $CLI_1 volume profile $V0 start