[Pacemaker] Monitor a resource without the cluster reacting to the result...

Andrew Beekhof beekhof at gmail.com
Thu Mar 26 04:57:22 EDT 2009


On Tue, Mar 24, 2009 at 10:45,  <foxycode at yahoo.com> wrote:
>
> I've been wanting this for some time now and expecting pacemaker would include it in it's newer versions. But I've checked the latest pacemaker 1.0 distribution fresh of the day, and unfortunately have found nothing in it indicating if this is possible.
>
> - Running a HAv2 or Openais cluster,
> - with a valid configured resource instance,
> - whether that resource is running properly, or not running at all, or limping on 3 or less legs,
> - under the 'root' account,
> - from the shell of a node in that cluster,
>
> .... what command should I type to cause the cluster to perform a "monitor" operation at a specific check level on that resource, and return the appropriate OCF status of the operation, *without* the cluster reacting like triggering a failover ?

Basically this is a bad idea.
If you don't want the cluster to react to an event, don't have it perform one.

I saw later that you want to prevent the cluster from doing anything
for the resource, simply set is-managed=false for the resource in
question.
Then, when you're done with your maintenance, set it back to true.

> I'd love to see something like:
>
> # crm_resource -m check_level resource_id
> ..
> < everything 'echo'ed by the monitor operation >
> ..
> Resource 'resource_id' is (running normally / in a failed or undeterminable state / cleanly stopped).
> #
>
> .... and $? holding the OCF_status of the monitor operation.
>
> And eventually ...
>
> # crm_resource -m check_level -h comma-separated-host-id-list resource_id

There may be a valid need for this one day, but blocking other actions
for the resource is definitely not it.

> And BTW, exactly what criteria does crm_resource -W' uses to say if a resource is running or not ?

It examines the resource's operation history, including recurring monitors.




More information about the Pacemaker mailing list