diff options
author | Venky Shankar <vshankar@redhat.com> | 2012-12-11 13:31:12 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-12-11 16:26:52 -0800 |
commit | a86e36373b648ba51a286614cae889a0fe9d3f52 (patch) | |
tree | 81f5a261ca7f15334dea1c5d508c2e5b5431d582 /tests/bugs/bug-861945.t | |
parent | cc9701d4f533bf7337d2925424e2498ab64fdf13 (diff) |
gsyncd / geo-rep: do not start geo-rep if replace brick is in progress
Change-Id: I9db32544ceb6f90c8231aaf40d722f6869a72614
BUG: 861945
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/4289
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/bugs/bug-861945.t')
-rwxr-xr-x | tests/bugs/bug-861945.t | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/bugs/bug-861945.t b/tests/bugs/bug-861945.t new file mode 100755 index 00000000000..29ccb33c8b1 --- /dev/null +++ b/tests/bugs/bug-861945.t @@ -0,0 +1,51 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc + +cleanup; + +function georep_start_and_check() +{ + local master=$1 + local slave=$2 + + $CLI volume geo-replication $master $slave start +} + +function georep_stop() +{ + local master=$1 + local slave=$2 + + $CLI volume geo-replication $master $slave stop +} + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 $H0:$B0/brick0 $H0:$B0/brick1 +TEST $CLI volume start $V0 + +sleep 5 + +slave=`mktemp -d` +mkdir -p $slave + +# check normal functionality of geo-replication +EXPECT_KEYWORD "successful" georep_start_and_check $V0 $slave +TEST georep_stop $V0 $slave + +# now invoke replace brick +TEST $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick2 start + +# check if CLI refuses to start geo replication +EXPECT_KEYWORD "failed" georep_start_and_check $V0 $slave + +# commit replace brick operation +TEST $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick2 commit + +# geo replication should work as usual +EXPECT_KEYWORD "successful" georep_start_and_check $V0 $slave +TEST georep_stop $V0 $slave + +rm -rf $slave +cleanup |