[Linux-HA] Score Calculation
dk at in-telegence.net
Fri Sep 14 01:57:31 MDT 2007
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?
>> Okay, maybe I should have read this more precisely.
>> "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.
More information about the Linux-HA