[Linux-HA] Automatic resource restart/clone resources

Max Hofer max.hofer at apus.co.at
Tue Oct 3 09:27:19 MDT 2006


On Tuesday 03 October 2006 13:05, Andrew Beekhof wrote:
> On 10/3/06, Max Hofer <max.hofer at apus.co.at> wrote:
> > In the current configuration i have a cloned resource (one instance for
> > each cluster node, 2 nodes in the cluster).
> >
> > The resource can not failover to the other node because it is an ISDN
> > card which apparently can not be relocated. The application running on
> > the cluster is a resource called APPL and depends on a running ISDN
> > resource.
> >
> > Currently when an ISDN resource fails on one node it is stopped on this
> > node and it is never restarted withouth manual intervention (setting
> > failcount to 0 or using crm_resource -C).
>
> try setting resource_failure_stickiness = 0 for just the ISDN resource
>
> > I have following questions:
> > * do i have to write a rule that a certain clone can only run on a
> > certain node?
>
> you cant do that at all.
But i can constrain the cloned resource only to a certain set of nodes, as you 
explained below. --- this gives the desried result - thx.

> are both ISDN connections ever active at the same time?  if not, you
> probably shouldnt be using a clone.
The cluster should show if an ISDN card fails (even on the passive node) even 
if it is not used (if not i would have a reduce cluster without noticing it). 
And thus i would say yes.

After the server is rebooted the ISDN card is only operatioanl if i reset it, 
load a parameter file and start a daemon (this is all done in the start 
operation). 

The monitor operation does:
- check if the daemon runs and fails if it is not running
- maps a connectievity attribute (ISDN layer 1 connectvity to an external 
system) to the CIB

The application APPL which needs an ISDN card should run on the node based on 
following condition:
- resource not failed and best connectivity

>
> > Or does clone_max, clone_node_max implicitely create those rules for
> > me? What happens when i add an additional node with no ISDN card at a
> > later stage?
>
> By default, symmetric_cluster = true.  This means you have to use
> rsc_location constraints to tell us where we CANT run the resources.
>
> If you set that to false, then you need to use rsc_location
> constraints to tell us where we _CAN_ run the resources.
>
> The idea being that you only need to specify the exception(s).
>
> > * Is there a way to tell the CRM to try a restart of the failed resource
> > (X times before giving up)
>
> If you mean "before giving up on node A", yes.  Thats what
> resource_failure_stickiness is for.  The problem is you set it to
> -INFINITY, which means X = 1.
>
> > The bahevaiour i really would llike to have:
> > * If the ISDN resource where APPL is runing fails, failover to the other
> > node (if there runs the ISDN resource)
>
> that would be automatic depending on your values of
> resource_failure_stickiness.
>
> > * if the ISDN resource fails, try to restart it again periodcailly
>
> a cron job resetting the failure count would achieve this

I just read following line on 
http://www.linux-ha.org/ClusterInformationBase/Clones#head-791f85e646e631be58eb054a70c3e75d3c568942

"Co-locational INFINITY constraints (ie. the resources must be co-located) for 
clones only make sense when the other resource is also a clone. Even then you 
are better off adding the resource to the resource group. All other cases are 
ignored."

This means i have to implement this without a cloned resource  and create an 
ISDN resource instance for each node and constrain the resouce on this node.

But how do i implement a rule like:

* run resource APPL on the node with a working ISDN card and best 
connectivity?

Can someone point me to an HOWTO-Write-Advanced-Rules? 
http://www.linux-ha.org/ClusterInformationBase/AdvancedRules gives me an 
empty page.

To be honest, the homepage for the HA-Linux project is really bad from an user 
point of view. I work with those page now for over 2 months and i still can't 
find the information I need. 

kind regards,
Max



More information about the Linux-HA mailing list