This fixed races in tests when an osd is starting while the previos
process is not finished yet.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
osd_index=$1
pidfile="out/osd.$osd_index.pid"
if [ -e $pidfile ]; then
- kill `cat $pidfile` && return 0
+ if kill `cat $pidfile` ; then
+ poll_cmd "eval test -e $pidfile ; echo \$?" "1" 1 30
+ [ $? -eq 1 ] && return 0
+ echo "ceph-osd process did not terminate correctly"
+ else
+ echo "kill `cat $pidfile` failed"
+ fi
else
echo "ceph-osd process $osd_index is not running"
fi