[Pacemaker] dampen / pingd - how to be sure pingd will be updated

Thomas Guthmann tguthmann at iseek.com.au
Tue Dec 21 01:52:04 EST 2010


Hey guys,

This may be dumb or obvious but it took me a long time to understand why my pingd with
dampen never got updated! So I think that this may be useful for everybody to share. 
In short: 

  " You MUST define a monitor interval HIGHER than the the dampen delay. "

An example is better than a long speech : 

*WILL WORK*
primitive pingd ocf:pacemaker:ping \
        params host_list="10.1.1.1" attempts="5" timeout="2" debug="true" dampen="50s" \
        op monitor interval="60" timeout="60" \
        op start interval="0" timeout="90" \
        op stop interval="0" timeout="90"

Because Monitor interval > dampen (60 > 50)

*WILL NOT WORK*
primitive pingd ocf:pacemaker:ping \
        params host_list="10.1.1.1" attempts="5" timeout="2" debug="true" dampen="50s" \
        op monitor interval="10" timeout="60" \
        op start interval="0" timeout="90" \
        op stop interval="0" timeout="90"

Because Monitor interval < dampen (10 < 50)

*Explanations*
Why ? Because every 10sec (monitor interval) pacemaker will trigger attrd_updater 
(check your logfiles for [1]). attrd_updater will wait for the dampen time given as
an argument (-d 50s in our example). However we won't be able to wait so long because
10sec later, attrd_updater is called again and obviously it resets dampen again and
again. Then pingd will never reach its dampen value and consequently pacemaker will 
NEVER update pingd (except if you force a reset with attrd_updater -R or if you 
modify the CIB). Q.E.D.

Something somewhere should test if dampen is inferior than monitor time. It could be
checked in the OCF in ping_validate(). But it doesn't seem to be used (note that their is 
code for an interval parameter that doesn't exist in ocf:pacemaker:ping anyway but comes 
from the old ocf:pacemaker:pingd).

Any objections/comments to this deductive reasoning ? 

[1] : attrd_updater: [9712]: info: Invoked: attrd_updater -n pingd -v 0 -d 50s 

-Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ping.possible.patch
Type: text/x-patch
Size: 582 bytes
Desc: not available
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101221/a0c69f5e/attachment-0002.bin>


More information about the Pacemaker mailing list