diff options
author | Gaurav Kumar Garg <garg.gaurav52@gmail.com> | 2015-09-04 22:10:55 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-09-09 17:06:17 -0700 |
commit | 61a60de37e7fdfa0b9a9ec83c3edc7a94e4e0ed2 (patch) | |
tree | 2c214b47bb4bbbe70f8832d742b3bef72e6c176d /tests | |
parent | b41579d839a8b6a1447dbb76c85aefdd44cedafe (diff) |
glusterd: Do not allow "detach-tier commit" unnecessarily
Backport of: http://review.gluster.org/#/c/12107/
Currently when user execute gluster v detach-tier commit command without
starting detach-tier or without giving force option then gluster will
success this operation.
Detach-tier commit should not allow without giving "force" optioin.
>>Reviewed-on: http://review.gluster.org/12107
>>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>>Tested-by: Gluster Build System <jenkins@build.gluster.com>
>>Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
>>Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Change-Id: Id161c288f6f3e0f6b298878a5c35a49fcbd9c6e3
BUG: 1259694
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/12108
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs/glusterd/bug-1260185-donot-allow-detach-commit-unnecessarily.t | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/bug-1260185-donot-allow-detach-commit-unnecessarily.t b/tests/bugs/glusterd/bug-1260185-donot-allow-detach-commit-unnecessarily.t new file mode 100644 index 00000000000..220216ec509 --- /dev/null +++ b/tests/bugs/glusterd/bug-1260185-donot-allow-detach-commit-unnecessarily.t @@ -0,0 +1,41 @@ +#!/bin/bash + +## Test case for BZ: 1260185 +## Do not allow detach-tier commit without "force" option or without +## user have not started "detach-tier start" operation + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc +. $(dirname $0)/../../cluster.rc + +cleanup; + +## Start glusterd +TEST glusterd; +TEST pidof glusterd; + +## Lets create and start the volume +TEST $CLI volume create $V0 $H0:$B0/${V0}{1..2} +TEST $CLI volume start $V0 + +## Perform attach-tier operation on volume $V0 +TEST $CLI volume attach-tier $V0 $H0:$B0/${V0}{3..4} + +## detach-tier commit operation without force option on volume $V0 +## should not succeed +TEST ! $CLI volume detach-tier $V0 commit + +## detach-tier commit operation with force option on volume $V0 +## should succeed +TEST $CLI volume detach-tier $V0 commit force + +## Again performing attach-tier operation on volume $V0 +TEST $CLI volume attach-tier $V0 $H0:$B0/${V0}{5..6} + +## Do detach-tier start on volume $V0 +TEST $CLI volume detach-tier $V0 start + +## Now detach-tier commit on volume $V0 should succeed. +TEST $CLI volume detach-tier $V0 commit + +cleanup; |