summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2014-07-17 08:30:52 +0000
committerKaushal M <kaushal@redhat.com>2014-07-24 23:29:01 -0700
commitc57895242fff0c05a24f99273f25cd793336f08d (patch)
treeb96b81141acdcf1ecadf03727a76a70b424732d1 /tests
parent88eb28678c3a16264b5baa57af0d16778ea2c9e6 (diff)
glusterd: update volinfo->subvol_count during remove-brick operation.
Problem: In glusterd_op_remove_brick(), volinfo->subvol_count was getting updated only if the replica count was reduced due to which subvol_matcher_verify() gave false errors under certain scenarios (see bug description). Fix: updated subvol_count for every remove-brick operation. Change-Id: Id72691e2bda1c624cd7d8cae92f6bf32c101a6d3 BUG: 1120647 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/8326 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/bug-1120647.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bugs/bug-1120647.t b/tests/bugs/bug-1120647.t
new file mode 100644
index 00000000000..4670faa79d4
--- /dev/null
+++ b/tests/bugs/bug-1120647.t
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+
+cleanup;
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{1..4}
+TEST $CLI volume start $V0
+TEST $CLI volume remove-brick $V0 $H0:$B0/brick{3..4} start
+EXPECT_WITHIN 10 "completed" remove_brick_status_completed_field "$V0 $H0:$B0/brick{3..4}"
+TEST $CLI volume remove-brick $V0 $H0:$B0/brick{3..4} commit
+TEST $CLI volume remove-brick $V0 replica 1 $H0:$B0/brick2 force
+
+cleanup;