summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2012-11-29 17:17:49 +0530
committerAnand Avati <avati@redhat.com>2012-12-05 15:32:28 -0800
commitddfef121a2254973ae72883112d1863052c6a580 (patch)
tree7f8024ac99c3ad23684373fffbbd4b35876eb9a9 /tests/volume.rc
parentf656425f3412005fa0d2b47b774052d4bf726bd4 (diff)
Add util function to kill brick
Change-Id: Ic67edd7edeaab16461c0009b49d951bfb4d79929 BUG: 859927 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4270 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index 268887416e1..32665467129 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -60,3 +60,12 @@ function afr_child_up_status {
function glustershd_up_status {
gluster volume status | grep "Self-heal Daemon" | awk '{print $6}'
}
+
+function kill_brick()
+{
+ vol=$1
+ host=$2
+ brick=$3
+ brick_hiphenated=$(echo $brick | tr '/' '-')
+ kill -9 `cat /var/lib/glusterd/vols/$vol/run/${host}${brick_hiphenated}.pid`
+}