[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] redhat cluster and resource agent



Hi Gilberto,

What you need to specify where to run each service is the Failover
Domain of each service.

Some info:

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/Cluster_Administration/s1-config-failover-domain-CA.html
http://sources.redhat.com/cluster/wiki/FailoverDomains

You have 4 different services, so I would use 2 or 4 different Failover
Domains to achieve your objective, depending on the availability of
running each of your services in your cluster nodes.

First you will need to define de Failover Domains:

Failover Domain X
Restricted domain: yes
Ordered: yes
Node A - Priority 1
Node B - Priority 2

And so on.

Then you'll need to set the Failover Domain for each of the services,
for example:
Service 1 -> FailoverDomain1
Service 2 -> FailoverDomain2
Service 3 -> FailoverDomain3
Service 4 -> FailoverDomain4

This can be all done with system-config-cluster, but using a resource
made by yourself into cluster.conf will give you some errors.

It should be similar to this:

<rm>
	<failoverdomains>
		<failoverdomain name="failoverdomain1" ordered="1"
restricted="1"><failoverdomainnode name="ulises"
priority="1"/><failoverdomainnode name="aquiles"
priority="2"/></failoverdomain>
		<failoverdomain name="failoverdomain2" ordered="1"
restricted="1"><failoverdomainnode name="caligula"
priority="1"/><failoverdomainnode name="ulises"
priority="2"/></failoverdomain>
	</failoverdomains>
	<resources>
[I think you need your definition of your myapp resources here]
	<myapp name="res11" myapp_home="/opt/myapp_11" shutdown_wait="0"/>
[...and so on]
	</resources>
[and then start the definition of your services]
	<service autostart="0" exclusive="0" name="srv11">
             <myapp ref="res11"/>
	</service>
[... and so on]
</rm>

Another question is: is your script usable by CMAN?

I hope this helps. Cheers,

Rafael

El lun, 07-12-2009 a las 18:41 +0100, gilberto migliavacca escribió:
> Hi
> 
> I'm a newbie in the red hat cluster configuration and
> I don't know if this is the right mailing list for my
> question.
> 
> I have to use my own resource agent script and I have
> to say to the cluster that the related service must be
> run just on single server.
> 
> I other words I want to drive 2 nodes with 4 instances
> of the same application (2 instances per node).
> 
> the infostructure is somehting like:
> 
> node_1
> /opt/myapp_11/bin/myapp.sh
> /opt/myapp_12/bin/myapp.sh
> node_2
> /opt/myapp_21/bin/myapp.sh
> /opt/myapp_22/bin/myapp.sh
> 
> 
> My idea is to create 4 services in the /etc/cluster/cluster.conf
> but I don't know how to related the service with a
> given machine and a related path on the given machine
> 
> 
> for my understanding I think I cannot use the Conga GUI (neither
> the system-config-cluster) and I have to edit manually the
> /etc/cluster/cluster.conf
> 
> could anyone help to write the XML section in the <rm> tag?
> 
> something like
> 
> <rm>
>      <service autostart="0" exclusive="0" name="srv11">
>              <myapp name="res11"
>                    myapp_home="/opt/myapp_11"
>                    shutdown_wait="0"/>
>      </service>
>      <service autostart="0" exclusive="0" name="srv12">
>              <myapp name="res12"
>                    myapp_home="/opt/myapp_12"
>                    shutdown_wait="0"/>
>      </service>
>      <service autostart="0" exclusive="0" name="srv21">
>              <myapp name="res21"
>                    myapp_home="/opt/myapp_21"
>                    shutdown_wait="0"/>
>      </service>
>      <service autostart="0" exclusive="0" name="srv22">
>              <myapp name="res22"
>                    myapp_home="/opt/myapp_22"
>                    shutdown_wait="0"/>
>      </service>
> </rm>
> 
> 
> As you can see I don't know how to specify the node
> 
> thanks in advance
> 
> gilberto
> 
> --
> Linux-cluster mailing list
> Linux-cluster redhat com
> https://www.redhat.com/mailman/listinfo/linux-cluster
-- 
Rafael Micó Miranda


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]