[Pacemaker] [PATCH] pingd checks pidfile on start

Takatoshi MATSUO matsuo.tak at gmail.com
Wed Mar 14 08:49:27 CET 2012


Hi

I use pacemaker 1.0.11 and pingd RA.
Occasionally, pingd's first monitor is failed after start.

It seems that the main cause is pingd daemon returns 0 before creating pidfile
and RA doesn't check pidfile on start.

test script
-------------------------------------
while true; do
    killall pingd; sleep 3
    rm -f /tmp/pingd.pid; sleep 1
    /usr/lib64/heartbeat/pingd -D -p /tmp/pingd.pid -a ping_status -d
0 -m 100 -h 192.168.0.1
   echo $?
   ls /tmp/pingd.pid; sleep .1
   ls /tmp/pingd.pid
done
-------------------------------------

result
-------------------------------------
0
/tmp/pingd.pid
/tmp/pingd.pid
0
ls: cannot access /tmp/pingd.pid:  No such file or directory   <- NG
/tmp/pingd.pid
0
/tmp/pingd.pid
/tmp/pingd.pid
0
/tmp/pingd.pid
/tmp/pingd.pid
0
/tmp/pingd.pid
/tmp/pingd.pid
0
ls: cannot access /tmp/pingd.pid: No such file or directory   <- NG
/tmp/pingd.pid
--------------------------------------

Please consider the attached patch for pacemaker-1.0.

Regards,
Takatoshi MATSUO
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pingd_check_pid.patch
Type: application/octet-stream
Size: 644 bytes
Desc: not available
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20120314/4ba17777/attachment-0001.obj>


More information about the Pacemaker mailing list