LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Heartbeat + LVS: need to reload config

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Heartbeat + LVS: need to reload config
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 26 Jun 2007 15:35:16 +0900
On Mon, Jun 25, 2007 at 12:45:52PM -0400, Chad Morland wrote:
> On 6/25/07, Tomas Hoger <tomas.hoger@xxxxxxxxx> wrote:
> >
> > On 6/23/07, Chad Morland <cmorland@xxxxxxxxx> wrote:
> > > Is there a way that I can reload the ldirectord process without failing
> > > over? I have autoreload=no and I don't want to turn it on.
> >
> > I guess it should be possible to do /etc/init.d/ldirectord restart or
> > just ldirectord restart.
> 
> 
> 
> The problem is that ldirectord is not started by the usual init scripts, it
> is started by heartbeat. The instructions I followed to setup LVS +
> heartbeat had me specifically disable the /etc/init.d/ldirectord script from
> running due to heartbeat.
> 
> # ps -ef |grep ldirectord
> root     15015     1  0 07:26 ?        00:00:13 /usr/bin/perl
> /etc/ha.d/resource.d/ldirectord ldirectord.cf start
> 
> Passing the reload option to that script seems to have no effect.

Hi All,

sorry for being a bit quiet.

You can get ldirectord to reread its configururation by running
/etc/init.d/ldirectord reload
or
/etc/ha.d/resource.d/ldirectord ldirectord.cf reload
or
just sending the process a sig -HUP.

Actually, these should all be equivalent.  And it is not important how
ldirectord was loaded.  Assuming the config is valid (more on that in
the next paragraph) the updates should be made in a fairly
non-destructive manner.

There is also an autoreload directive and if you set this to yes in the
ldirectord.cf then ldirectord will automatically check to see if its
configuration has been changed and reload it if it has. However I
recommend that people don't use this as if you were in the middle of
editing the configuration, and had saved an intermediate copy, then
ldirectord would attempt to load it.  This is compounded by the problem
that regardless of what causes ldirectord to reload its config, if the
config is invalid then ldirectord will exit with an error.

I guess that implementing ldirectord checkconfig would be a good idea.
But in the mean time, be careful :-)


-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/



<Prev in Thread] Current Thread [Next in Thread>