Re: piranha problem?
Edward Croft <[email protected]> Tue, 17 Feb 2004 08:19:20 -0500
| Newsgroups | gmane.linux.redhat.piranha |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2004-02-17 at 06:00, marco wrote:
> Hy all,
>
> I've a problem whit piranha, it works always fine, but when an IP
> fault occurs (even it is just for 2 second) i've a takeover ignoring
> the timeout i've in my lvs.cf.
>
> This is my system:
> Redhat advanced server 2.1
> Kernel 2.4.9
> freeswan-1.97-2
> piranha-0.7.0-3
>
> and my lvs.cf
>
>
>
> service = fos
> primary = ........1.121
> primary_private = 10.15.1.1
> backup = .......1.122
> backup_active = 1
> backup_private = 10.15.1.2
> heartbeat = 1
> heartbeat_port = 1050
>
> keepalive = 10
> deadtime = 30
>
> rsh_command = ssh
>
> failover ldap {
> active = 1
> address = .......1.156 eth0:0
> vip_nmask = 255.255.0.0
> port = 389
> timeout = 30
> start_cmd = "/etc/rc.d/init.d/ldap start"
> stop_cmd = "/etc/rc.d/init.d/ldap stop"
> }
>
> failover ipsec {
> active = 1
> address = ......1.156 eth0:0
> vip_nmask = 255.255.0.0
> port = 389
> timeout = 30
> start_cmd = "/etc/rc.d/init.d/ipsec start"
> stop_cmd = "/etc/rc.d/init.d/ipsec stop; ifconfig ipsec0 down;
> rmmod ipsec"
> }
>
>
>
> This is the message in /var/log/messages:
>
> Feb 11 15:45:41 LS2 nanny[2081]: Exiting due to connection failure of
> ......1.156:389
> Feb 11 15:45:41 LS2 nanny[2103]: Exiting due to connection failure of
> ........1.156:389
> Feb 11 15:45:41 LS2 fos[2056]: Monitor for service 128.50.1.88:389
> exited. This is a failo
> ver condition!
>
>
>
> Thanks in advance
I am not an expert but I have set up a few of these with some help from
this group. At first blush, I would say that it will failover because
there is no test condition. Both your LDAP and IPSEC server are being
tested on the same port. Why not just test for the LDAP server and if
that is not there run a command that will switch over both services. An
example would be:
failover qagateway {
address = 10.0.13.254 eth1:2
vip_nmask = 255.255.255.0
active = 1
port = 80
timeout = 6
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
start_cmd = "/etc/init.d/httpd start"
stop_cmd = "/etc/init.d/httpd stop"
}
Note the send and expect. That is the test that is being done. Failing
that, it fails over. I am not really sure how it would react with no
test condition. I think what happens is that piranha uses telnet to the
specified port and either does a send with an expect or just has an
expect for the value you expect to see. If it gets the value it expects,
then it would be fine. You may want to man lvs.cf on your system to see
what each of the values represent. You can also use info lvs.cf.
Hope that helps a little.
--
Edward M. Croft
Sr. Systems Engineer
Open Ratings, Inc.
200 West Street
Waltham, MA 02451-1121