diff options
author | Gaurav Kumar Garg <ggarg@redhat.com> | 2015-02-15 19:22:13 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-04-09 17:21:06 +0000 |
commit | 2788ddd3a0afa98f78128247cca89427a323b090 (patch) | |
tree | 4568c2a808caa62cc06516e6fd3f392250e4217f /tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t | |
parent | e405f6e419387d160f6564d15ad9fd3a43af0d10 (diff) |
glusterd: remove-brick status/stop should not show output for non-existing brick
Previously when user start remove-brick operation on a volume then by
giving non-existing brick for remove-brick status/stop command it was
showing remove-brick status/stoping remove-brick operation on a volume.
With this fix it will validate bricks which user have given for
remove-brick status/stop command and if bricks are part of volume then
it will show statistics of remove-brick operation otherwise it will show
error "Incorrect brick <brick_name> for <volume_name>".
Change-Id: I151284ef78c25f52d1b39cdbd71ebfb9eb4b8471
BUG: 1121584
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/9681
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t')
-rw-r--r-- | tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t b/tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t new file mode 100644 index 00000000000..de80afcc2eb --- /dev/null +++ b/tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t @@ -0,0 +1,34 @@ +#!/bin/bash + +## Test case for BZ-1121584. Execution of remove-brick status/stop command +## should give error for brick which is not part of volume. + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc +. $(dirname $0)/../../dht.rc + +cleanup; + +## Start glusterd +TEST glusterd +TEST pidof glusterd + +## Lets Create and start volume +TEST $CLI volume create $V0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 +TEST $CLI volume start $V0 + +## Start remove-brick operation on the volume +TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}1 start + +## By giving non existing brick for remove-brick status/stop command should +## give error. +TEST ! $CLI volume remove-brick $V0 $H0:$B0/ABCD status +TEST ! $CLI volume remove-brick $V0 $H0:$B0/ABCD stop + +## By giving brick which is part of volume for remove-brick status/stop command +## should print statistics of remove-brick operation or stop remove-brick +## operation. +TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}1 status +TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}1 stop + +cleanup; |