diff options
-rwxr-xr-x | dvm/764265/testcase | 27 | ||||
-rwxr-xr-x | dvm/764548/testcase | 48 |
2 files changed, 75 insertions, 0 deletions
diff --git a/dvm/764265/testcase b/dvm/764265/testcase new file mode 100755 index 0000000..952dd8f --- /dev/null +++ b/dvm/764265/testcase @@ -0,0 +1,27 @@ +#!/bin/bash +source $cwd/regression_helpers +mkdir -p /tmp/$global_bug_id &> /dev/null + +#create,start and mount +$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null ; +$GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null; +mount_glusterfs $global_bug_id + +#start gsyncd first +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id start &> /dev/null; + +sleep 10; + +#stop gsyncd +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null; + +sleep 10; + +ps aux| grep gsyncd.py | grep monitor &> /dev/null +if [ $? -ne 0 ]; then + rm -rf /tmp/$global_bug_id &> /dev/null + exit 0; +else + rm -rf /tmp/$global_bug_id &> /dev/null + exit 255; +fi diff --git a/dvm/764548/testcase b/dvm/764548/testcase new file mode 100755 index 0000000..1c164d5 --- /dev/null +++ b/dvm/764548/testcase @@ -0,0 +1,48 @@ +#!/bin/bash + +source $cwd/regression_helpers; + +#create, start volume +$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null; + +$GLUSTERFSDIR/gluster volume start $global_bug_id &> /dev/null; + +sleep 10; + +$GLUSTERFSDIR/gluster volume create backup $(hostname):$EXPORT_DIR/$global_bug_id/export_bak &>/dev/null; + +$GLUSTERFSDIR/gluster volume start backup &> /dev/null; + +#start gsyncd +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id :backup start &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +sleep 10; +ps aux|grep gsyncd.py | grep monitor | grep backup &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +#stop master & create, start new master volume +$GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id &> /dev/null; + +$GLUSTERFSDIR/gluster volume create newmaster $(hostname):$EXPORT_DIR/$global_bug_id/export4 $(hostname):$EXPORT_DIR/$global_bug_id/export5 &>/dev/null; + +$GLUSTERFSDIR/gluster volume start newmaster &> /dev/null; + +sleep 10; + +$GLUSTERFSDIR/gluster volume geo-replication newmaster :backup start &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +sleep 10; +ps aux|grep gsyncd.py | grep monitor | grep newmaster &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +else + exit 0; +fi |