diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-12-26 12:08:36 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-12-26 12:08:58 +0530 |
commit | bcde87f571e34626a79e69524d8dfe007ba6357a (patch) | |
tree | 78456803877a3af354f1c2648b879a923f283823 /dvm/3602 | |
parent | 25bf46a93923cbdb6b3eb2b3971784397c816a32 (diff) |
3602: check if there is a cli command to start the self-healing
Change-Id: I18581c3b90e571f34822f13d3453573d55dfa783
BUG: 3602
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Diffstat (limited to 'dvm/3602')
-rwxr-xr-x | dvm/3602/testcase | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dvm/3602/testcase b/dvm/3602/testcase new file mode 100755 index 0000000..7e06c71 --- /dev/null +++ b/dvm/3602/testcase @@ -0,0 +1,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 "$@" |