blob: 7e06c710d81cca04a8a7c9a3749c66a81ad7af53 (
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
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
function _init ()
{
source $cwd/regression_helpers;
}
function heal ()
{
$GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 --mode=script 2>/dev/null 1>/dev/null
$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
$GLUSTERFSDIR/gluster volume heal $global_bug_id 2>/dev/null 1>/dev/null;
if [ $? -eq 0 ]; then
return 0;
else
return 2;
fi
}
function main ()
{
local ret;
heal;
ret=$?;
if [ $ret -eq 0 ]; then
exit 0;
else
exit 1;
fi
}
_init && main "$@"
|