[Pacemaker] ping RA question

Dan Urist durist at ucar.edu
Tue Jul 26 14:49:34 UTC 2011


On Tue, 26 Jul 2011 18:41:25 +0800
Yingliang Yang <zjutyyl at gmail.com> wrote:

> 2011/7/22 Dan Urist wrote:
> > I am in the process of trying to write an fping RA, based on the
> > pacemaker ping RA. My impetus for this is that I would like the RA
> > to return success as soon as any ping succeeds; the behavior of
> > linux's system ping as used in the standard ping RA is to run COUNT
> > pings within the given deadline and only after COUNT or the
> > deadline return success if any of the pings succeeded-- very
> > inefficient.
> >
> > My question is this: the ping RA sets default values for
> > OCF_RESKEY_CRM_meta_timeout and OCF_RESKEY_CRM_meta_interval, and it
> > tests that OCF_RESKEY_CRM_meta_interval is an integer greater than
> > 0. These variables aren't used anywhere else within the RA, but
> > these are the same values in the "actions" section of the metadata
> > for the monitor timeout and interval. I can't find any
> > documentation that these variables serve as defaults for the
> > monitor action in either the OCF agent developer guide or the
> > pacemaker docs, but this seems to be the intent. Is this what
> > they're there for?
> 
>  I think so.
> The values in the "actions" section of the metadata for the monitor
> timeout and interval, are used as monitor operation's default values.

Not to be pedantic, but that's not what the OCF RA developer's guide
says, from http://www.linux-ha.org/doc/dev-guides/_metadata.html:

  Every action should list its own timeout value. This is a hint to the
  user what minimal timeout should be configured for the action. This is
  meant to cater for the fact that some resources are quick to start and
  stop (IP addresses or filesystems, for example), some may take several
  minutes to do so (such as databases).

  In addition, recurring actions (such as monitor) should also specify a
  recommended minimum interval, which is the time between two
  consecutive invocations of the same action. Like timeout, this value
  does not constitute a default — it is merely a hint for the user
  which action interval to configure, at minimum.


> OCF_RESKEY_CRM_meta_timeout and OCF_RESKEY_CRM_meta_interval are come
> from the monitor operation's actual values.

Are you sure these variables are used for the monitor action? There's
no documentation for these that I can find, either in the OCF RA
developer's guide or here:
http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-resource-options.html

I've grepped through all the resource agents
under /usr/lib/ocf/resource.d (this is on a Debian Lenny system); the
only thing I can see meta_timeout used for is calculating a reasonable
shutdown timeout, and the only thing I see meta_interval used for is to
detect a probe.

-- 
Dan Urist
durist at ucar.edu
303-497-2459




More information about the Pacemaker mailing list