diff options
author | ggarg <ggarg@redhat.com> | 2014-04-29 09:58:16 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2014-09-24 05:29:43 -0700 |
commit | b097225202629448e3b10dc4160125c376971682 (patch) | |
tree | e5ff080e3deb3e01fd4cc6036704ad68e790cc1b /tests/bugs | |
parent | 70d76f20ee127fe7e8e52b2d67e2362283a01f34 (diff) |
glusterd: Move brick order check from cli to glusterd.
Previously the brick order check for replicate volumes on volume
create and add-brick was done by the cli. This check would fail
when a hostname wasn't resolvable and would question the user
if it was ok to continue. If the user continued, glusterd would
fail the command again as the hostname wouldn't be resolvable.
This was unnecessary.
This change, moves the check from cli into glusterd. The check
is now performed during staging of volume create after the
bricks have been resolved. This prevents the above condition
from occurring.
As a result of this change, the user will no longer be
questioned and given an option to continue the operation
when a bad brick order is given or the brick order check
fails. In such a case, the user can use 'force' to bypass
the check and allow the command to succeed.
Change-Id: I009861efaf3fb7f553a9b00116a992f031f652cb
BUG: 1091935
Signed-off-by: ggarg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/7589
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'tests/bugs')
-rwxr-xr-x | tests/bugs/bug-1091935-brick-order-check-from-cli-to-glusterd.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/bugs/bug-1091935-brick-order-check-from-cli-to-glusterd.t b/tests/bugs/bug-1091935-brick-order-check-from-cli-to-glusterd.t new file mode 100755 index 00000000000..d5edabda806 --- /dev/null +++ b/tests/bugs/bug-1091935-brick-order-check-from-cli-to-glusterd.t @@ -0,0 +1,27 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd + +cli1=$(echo $CLI | sed 's/ --wignore//') + +# Creating volume with non resolvable host name +TEST ! $cli1 volume create $V0 replica 2 $H0:$B0/${V0}0 redhat:$B0/${V0}1 \ + $H0:$B0/${V0}2 redhat:$B0/${V0}3 + +# Creating distribute-replica volume with bad brick order. It will fail +# due to bad brick order. +TEST ! $cli1 volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1 \ + $H0:$B0/${V0}2 $H0:$B0/${V0}3 + +# Now with force at the end of command it will bypass brick-order check +# for replicate or distribute-replicate volume. and it will create volume +TEST $cli1 volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1 \ + $H0:$B0/${V0}2 $H0:$B0/${V0}3 force + +cleanup; |