Skip to content

Commit

Permalink
commit: test: check daemon is alive or not agagin when sleep 60s
Browse files Browse the repository at this point in the history
Signed-off-by: Xinze Chi <[email protected]>
  • Loading branch information
XinzeChi committed May 29, 2015
1 parent 9f0d2da commit 83f88e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/ceph-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,22 @@ function kill_daemons() {
local dir=$1
local signal=${2:-KILL}
local name_prefix=$3 # optional, osd, mon, osd.1
local delays=${4:-0 1 1 1 2 3 5 5 5 10 10 20 60}
local delays=${4:-0 0 1 1 1 2 3 5 5 5 10 10 20 60}

local status=0
for pidfile in $(find $dir | grep $name_prefix'[^/]*\.pid') ; do
pid=$(cat $pidfile)
local send_signal=$signal
local kill_complete=false
for try in $delays ; do
sleep $try
if kill -$send_signal $pid 2> /dev/null ; then
kill_complete=false
else
kill_complete=true
break
fi
send_signal=0
sleep $try
done
if ! $kill_complete ; then
status=1
Expand Down

0 comments on commit 83f88e7

Please sign in to comment.