diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2012-01-05 04:55:42 -0800 |
---|---|---|
committer | Gerrit Code Review <root@dev.gluster.com> | 2012-01-05 04:55:42 -0800 |
commit | dec59a0fc27e016fbd47e34ba056dcc0ccc82880 (patch) | |
tree | 023796f78a48641c62731ed06e1fd78c5b1ff9c5 /dvm | |
parent | 002a8e9951af1ccdbbc1ecf7703054b2365328bf (diff) | |
parent | e92154e05c0c177c6b595f2adbc745f4f4fe43b3 (diff) |
Merge "3666: check if the self-heal daemon is also stopped, when a replicate volume is stopped"
Diffstat (limited to 'dvm')
-rwxr-xr-x | dvm/3666/testcase | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dvm/3666/testcase b/dvm/3666/testcase new file mode 100755 index 0000000..330c3a7 --- /dev/null +++ b/dvm/3666/testcase @@ -0,0 +1,31 @@ +#!/bin/bash + +function _init () +{ + source $cwd/regression_helpers; +} + +function glustershd_running () +{ + $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; + + ls /etc/glusterd/glustershd/run/glustershd.pid 2>/dev/null 1>/dev/null; + + if [ $? -ne 0 ]; then + return 2; + fi + + $GLUSTERFSDIR/gluster volume stop $global_bug_id --mode=script 2>/dev/null 1>/dev/null; + + ls /etc/glusterd/glustershd/run/glustershd.pid 2>/dev/null 1>/dev/null; + + if [ $? -ne 0 ]; then + return 0; + else + return 1; + fi +} + +_init ; glustershd_running |