summaryrefslogtreecommitdiffstats
path: root/tests/cluster.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cluster.rc')
-rw-r--r--tests/cluster.rc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/cluster.rc b/tests/cluster.rc
index 467bbcb06e1..6dece8182e4 100644
--- a/tests/cluster.rc
+++ b/tests/cluster.rc
@@ -95,6 +95,7 @@ function kill_node() {
h="H$index";
kill -9 $(ps -ef | grep gluster | grep ${!h} | awk '{print $2}');
+ find $B0/$index/glusterd/vols -name '*.pid' | xargs rm -f
}
@@ -177,3 +178,14 @@ function brick_up_status_1 {
local brick=$3
$CLI_1 volume status $vol $host:$brick --xml | sed -ne 's/.*<status>\([01]\)<\/status>/\1/p'
}
+
+function online_brick_count {
+ local bricks
+ local total=0
+ local i
+ for i in $(seq 1 $CLUSTER_COUNT); do
+ bricks=$(find $B0/$i/glusterd/vols -name '*.pid' | wc -l)
+ total=$((total+bricks))
+ done
+ echo $total
+}