[Pacemaker] [PATCH] pingd checks pidfile on start

Takatoshi MATSUO matsuo.tak at gmail.com
Wed Mar 14 03:49:27 EDT 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: 645 bytes
Desc: not available
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20120314/4ba17777/attachment-0002.obj>


More information about the Pacemaker mailing list