Mailing List Archive

Simpler solution than custom OCF scripts ?
Hi,

I'm quite new to Corosync/Pacemaker but I managed to get my cluster to work:
I have 2 nodes on CentOS5.8 (therefore Pacemaker 1.0.12 and Corosync
1.2.7) running samba-winbind-radius.
The cluster is running fine, but it only knows about one resource, the
failover IP address.

Now, I would like to go further and make the cluster aware of the
state of the above-mentionned services. Reading the documentation, I
understand that I should write OCF scripts for each of the resources
(winbind and radius) that really check that the service is delivered,
not just that the daemon is running. Then declare all these resources
and their affinities on the cluster.

Am I correct ? Or is there a simpler way ?
For example, is it possible to just tell the IPaddr2 resource to
monitor a single script and migrate if it tells it to ?
Or even the quick-and-dirtiest: run my script with cron and stop the
corosync daemon if I detect a problem ^^

What is 'the right way' ?

Thank you for your time.

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Re: Simpler solution than custom OCF scripts ? [ In reply to ]
On 2012-04-04T15:12:49, Julien Cornuwel <cornuwel@gmail.com> wrote:

> Hi,
>
> I'm quite new to Corosync/Pacemaker but I managed to get my cluster to work:
> I have 2 nodes on CentOS5.8 (therefore Pacemaker 1.0.12 and Corosync
> 1.2.7) running samba-winbind-radius.
> The cluster is running fine, but it only knows about one resource, the
> failover IP address.
>
> Now, I would like to go further and make the cluster aware of the
> state of the above-mentionned services. Reading the documentation, I
> understand that I should write OCF scripts for each of the resources
> (winbind and radius) that really check that the service is delivered,
> not just that the daemon is running. Then declare all these resources
> and their affinities on the cluster.

You can just use the LSB init script if one is provided.

> Or even the quick-and-dirtiest: run my script with cron and stop the
> corosync daemon if I detect a problem ^^

My first thought to this was "WTF?". ;-)

Regards,
Lars

--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imend├Ârffer, HRB 21284 (AG N├╝rnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Re: Simpler solution than custom OCF scripts ? [ In reply to ]
2012/4/4 Lars Marowsky-Bree <lmb@suse.com>:

> You can just use the LSB init script if one is provided.

Well, it is OK for 'start' and 'stop', but the status is clearly
lacking: it just checks if the process is running, not if the service
is delivered.
I think I'll write a simple wrapper around the LSB script but perform
real tests in 'status'...

>> Or even the quick-and-dirtiest: run my script with cron and stop the
>> corosync daemon if I detect a problem ^^
>
> My first thought to this was "WTF?". ;-)

Glad I made you laugh ;-)

Thanks for your help

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Re: Simpler solution than custom OCF scripts ? [ In reply to ]
----- Original Message -----
> From: "Julien Cornuwel" <cornuwel@gmail.com>
> To: "The Pacemaker cluster resource manager" <pacemaker@oss.clusterlabs.org>
> Sent: Wednesday, April 4, 2012 12:41:32 PM
> Subject: Re: [Pacemaker] Simpler solution than custom OCF scripts ?
>
> 2012/4/4 Lars Marowsky-Bree <lmb@suse.com>:
>
> > You can just use the LSB init script if one is provided.
>
> Well, it is OK for 'start' and 'stop', but the status is clearly
> lacking: it just checks if the process is running, not if the service
> is delivered.
> I think I'll write a simple wrapper around the LSB script but perform
> real tests in 'status'...

That sounds like an OCF Resource Agent to me.....

just my 2 cents!

Jake

>
> >> Or even the quick-and-dirtiest: run my script with cron and stop
> >> the
> >> corosync daemon if I detect a problem ^^
> >
> > My first thought to this was "WTF?". ;-)
>
> Glad I made you laugh ;-)
>
> Thanks for your help
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started:
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>
>

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org