summaryrefslogtreecommitdiffstats
path: root/dvm/764265/testcase
blob: 952dd8fd6f14f65a21c73f869381a4a6062524d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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