[Linux-HA] Score Calculation

Andrew Beekhof beekhof at gmail.com
Fri Sep 14 02:02:09 MDT 2007


On 9/14/07, Dominik Klein <dk at in-telegence.net> wrote:
> Andrew Beekhof schrieb:
> > On 9/14/07, Dominik Klein <dk at in-telegence.net> wrote:
> >>>> Yes I meant the resource is running first and crashes later on, so that
> >>>> monitor reports "not running".
> >>> generally, one shouldn't report "not running" in such cases
>
> Then what did you mean by this?

because often there are lockfiles/routing entries/other remnants left
over that should be cleaned up

if thats not the case for your resource, then NOT_RUNNING is probably fine

>
> >> Okay, maybe I should have read this more precisely.
> >> http://www.linux-ha.org/OCFResourceAgent
> >> "monitor - monitor the health of a resource. Exit 0 if the resource is
> >> running, 7 if it is stopped and anything else if it is failed"
> >>
> >> Okay. Good to know. But how can I (my RA) know wether Linux-HA expects
> >> my resource to run or not to run when it calls the monitor script?
> >
> > you can't and you shouldn't try
> >
> > just report the truth
> > - if its not running and can be safely started, use OCF_NOT_RUNNING
> > - if its running, use OCF_SUCCESS
> > - if its some state in-between, use one of the other error codes
> >
> >> Iirc it calls "monitor" on probe and on monitor action. Is there a way
> >> to determine what it expects to get? Because the way I understand it
> >> now, I have to return OCF_NOT_RUNNING in case "monitor" is called by
> >> probe and the resource is not runnning and return OCF_ERR_GENERIC (or
> >> some other non-0 and non-7 value) if "monitor" is called by monitor and
> >> the resource is not running.
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>



More information about the Linux-HA mailing list