diff options
author | Ravishankar N <ravishankar@redhat.com> | 2013-12-11 17:30:13 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-12-13 08:50:23 -0800 |
commit | 7fc2499db89e385332f09fb06c10cb524f761875 (patch) | |
tree | 1aec8685d675f93e9bd280d1e57aa5b4b4e89b15 /tests/bugs/bug-1040408.t | |
parent | 0404be9ca1d9fa15c83bc4132561091c1c839d84 (diff) |
glusterd: fix error in remove-brick-replica validation
Problem:
Reducing replica count of a volume using remove-brick command fails
if bricks are specified in a random order.
Fix: Modify subvol_matcher_verify() to permit order agnostic
replica count reduction.
Change-Id: I1f3d33e82a70d9b69c297f69c4c1b847937d1031
BUG: 1040408
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/6489
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/bugs/bug-1040408.t')
-rw-r--r-- | tests/bugs/bug-1040408.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs/bug-1040408.t b/tests/bugs/bug-1040408.t new file mode 100644 index 00000000000..2982d6a81c0 --- /dev/null +++ b/tests/bugs/bug-1040408.t @@ -0,0 +1,31 @@ +#!/bin/bash + +#Test case: Create a distributed replicate volume, and reduce +#replica count + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +#Basic checks +TEST glusterd +TEST pidof glusterd +TEST $CLI volume info + +#Create a 2X3 distributed-replicate volume +TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{1..6}; +TEST $CLI volume start $V0 + +# Reduce to 2x2 volume by specifying bricks in reverse order +function remove_brick_status { + $CLI volume remove-brick $V0 replica 2 \ + $H0:$B0/${V0}6 $H0:$B0/${V0}3 force 2>&1 |grep -oE "success|failed" +} +EXPECT "success" remove_brick_status; + +TEST $CLI volume stop $V0 +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; |