Tommy Grändefors wrote:
>
> Hmm, this sounds a bit awkward. Today, I already have a MON alert script
> that removes/adds hosts on the fly to/from the NAT table when needed using
> the iptables command.
> This means that my alert script must perform the following additional tasks
> each time a realserver goes up or down:
> 1. Parse my LVS config file and remove/add the failing host's name from the
> SERVICE variable.
> 2. Execute 'configure' on my LVS script.
> 3. Copy the resulting file 'rc.lvs_nat' to the '/etc/init.d/' directory in
> order for it to be executed during restart of the OS.
configure writes mon files for the configured services. You shouldn't
have to write your own. It's been a long time since I've tested them
I'll admit.
> Is there a "smoother" way to accomplish the above?
contributions always welcome.
> Btw, what's the reason for LVS to ping all hosts (defined in the SERVICE
> variable) during execution of the 'rc.lvs_nat' script?
in case the machine isn't up and you don't realise it.
> Why does it hang upon
> ping failures?
ping doesn't return
> Is it possible to use a time-out to avoid the hang issue?
sure.
Joe
--
Joseph Mack PhD, Senior Systems Engineer, SAIC contractor
to the National Environmental Supercomputer Center,
ph# 919-541-0007, RTP, NC, USA. mailto:mack.joseph@xxxxxxx
|