[Linux-cluster] init scripts and the scope of a service

Jeremy Carroll Jeremyc at tasconline.com
Sat Aug 25 18:08:37 UTC 2007


If I had two High Availability services on the same IP it would not be
good. If one of the services bound to the same IP would fail the IP is
stripped away when it is relocated to a different machine. Causing the
second service to fail. I believe this is the situation your are
currently in.

Use one IP per service. If you cannot do this for architectural reasons
use Piranha (LVS) to front-end load balance services on your back end
cluster. That is what it is there for.

http://www.redhat.com/support/wpapers/piranha/x32.html


-----Original Message-----
From: linux-cluster-bounces at redhat.com
[mailto:linux-cluster-bounces at redhat.com] On Behalf Of Jos Vos
Sent: Saturday, August 25, 2007 2:18 AM
To: linux clustering
Subject: Re: [Linux-cluster] init scripts and the scope of a service

On Fri, Aug 24, 2007 at 11:05:08PM -0700, Jon S wrote:

> Given the Cluster Suite's preference to disable, restart or relocate a
> service after an init script resource returns non-zero, I'm curious
how
> best to handle a significant number of applications tied to a single
> IP resource.  The easy thing to do is to just define a bunch of init
> scripts in a single service with the IP resource.  Problem is, of
course,
> that if one script returns non-zero, all resources in the service are
> stopped and restarted.

I never tried defining multiple services in one script, I assume it
works as you say.

But I prefer another solution: create one service script and in that
script call the various init scripts (or start the applications
directly, all dependent on the type of application).  Still, if your
script is asked to "stop" the service, you should stop all apps, as
you don't know the reason.

The only way to circumvent this is to make the "status" of this
all-in-one service script more intelligent: if one application has
a problem, it could try to restart that specific application and, if
that succeeds, just return 0 as status for the service as if nothing
has happened.

The other solution is to use different services, but that requires
different IP addresses.

-- 
--    Jos Vos <jos at xos.nl>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204

--
Linux-cluster mailing list
Linux-cluster at redhat.com
https://www.redhat.com/mailman/listinfo/linux-cluster




More information about the Linux-cluster mailing list