diff options
author | Rahul C S <rahulcs@redhat.com> | 2012-01-04 14:57:22 +0530 |
---|---|---|
committer | Rahul C S <rahulcs@redhat.com> | 2012-01-06 11:39:17 +0530 |
commit | a29da31f9851c4d0ed0cc7e361a64864c2845ed1 (patch) | |
tree | e3dc6039f396c799413ed4c68d7a6701458a7747 | |
parent | 35d91591d1dcf992bebb44f4bfbd8a814a2c403c (diff) |
Check for gsyncd crash during directory crawl
Create multiple directories & do directory crawl
on the mount point to check if there is any crash
by checking gsyncd process
Change-Id: I96d27b7fde784772667c75705648a5d48616965a
BUG: 764072
Signed-off-by: Rahul C S <rahulcs@redhat.com>
-rwxr-xr-x | dvm/764072/testcase | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dvm/764072/testcase b/dvm/764072/testcase new file mode 100755 index 0000000..3748820 --- /dev/null +++ b/dvm/764072/testcase @@ -0,0 +1,44 @@ +#!/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; + +sleep 10; +#start gsyncd first +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id start &> /dev/null +if [ $? -ne 0 ]; then + exit 255; +fi + +sleep 10; + +ps aux | grep gsyncd.py | grep monitor &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +mkdir -p $FUSE_MOUNT/dir/dir{1..2}; +touch $FUSE_MOUNT/file{1..2}; + +sleep 5; + +ls -l $FUSE_MOUNT/* &> /dev/null; + +sleep 5; + +ps aux | grep gsyncd.py | grep monitor &> /dev/null; +if [ $? -ne 0 ]; then + $GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null + rm -rf /tmp/$global_bug_id &> /dev/null + exit 255; +else + $GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null + rm -rf /tmp/$global_bug_id &> /dev/null + exit 0; +fi |