diff options
| author | N Balachandran <nbalacha@redhat.com> | 2016-11-17 18:16:18 +0530 |
|---|---|---|
| committer | Atin Mukherjee <amukherj@redhat.com> | 2016-11-17 10:15:53 -0800 |
| commit | 7579370add44ee7d6cd854584964706f7248c035 (patch) | |
| tree | 7debd22613dc85068df465ed1c1b9b5d0ad0f28e /tests | |
| parent | 65f785bb9b484e42eac39af0e468a0a9f46c8e99 (diff) | |
cli/rebalance: remove brick status is incorrect
If a remove brick operation is preceded by a fix-layout,
running remove-brick status on a node which does not
contain any of the bricks that were removed displays
fix-layout status.
The defrag_cmd variable was not updated in glusterd
for the nodes not hosting removed bricks causing the
status parsing to go wrong. This is now updated.
Also made minor modifications to the spacing in
the fix-layout status output.
> Change-Id: Ib735ce26be7434cd71b76e4c33d9b0648d0530db
> BUG: 1389697
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
> Reviewed-on: http://review.gluster.org/15749
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
(cherry picked from commit 35b085ba345cafb2b0ee978a4c4475ab0dcba5a6)
Change-Id: I3da89c61da07bc5e037527aafc84d184dcd1f764
BUG: 1396109
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/15870
Tested-by: Atin Mukherjee <amukherj@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/distribute/bug-1389697.t | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/bugs/distribute/bug-1389697.t b/tests/bugs/distribute/bug-1389697.t new file mode 100644 index 00000000000..0d428b8d9d2 --- /dev/null +++ b/tests/bugs/distribute/bug-1389697.t @@ -0,0 +1,42 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../cluster.rc + + +cleanup + +TEST launch_cluster 2; +TEST $CLI_1 peer probe $H2; +EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count + +TEST $CLI_1 volume create $V0 $H1:$B1/b1 $H1:$B1/b2 $H2:$B2/b3 +TEST $CLI_1 volume start $V0 + +#Start a fix-layout +TEST $CLI_1 volume rebalance $V0 fix-layout start + +#volume rebalance status should work +TEST $CLI_1 volume rebalance $V0 status +$CLI_1 volume rebalance $V0 status + +val=$($CLI_1 volume rebalance $V0 status |grep "fix-layout" 2>&1) +val=$? +TEST [ $val -eq 0 ]; + +#Start a remove brick for the brick on H2 +TEST $CLI_1 volume remove-brick $V0 $H2:$B2/b3 start +TEST $CLI_1 volume remove-brick $V0 $H2:$B2/b3 status + +#Check remove brick status from H1 +$CLI_1 volume remove-brick $V0 $H2:$B2/b3 status |grep "fix-layout" 2>&1 +val=$? +TEST [ $val -eq 1 ]; + +$CLI_1 volume remove-brick $V0 $H2:$B2/b3 status +$CLI_2 volume remove-brick $V0 $H2:$B2/b3 status + + +TEST $CLI_1 volume remove-brick $V0 $H2:$B2/b3 stop + +cleanup |
