fail-over using vrrp and MISC_CHECK

"Yu Safin" <[email protected]> Fri, 27 Oct 2006 16:21:12 -0400
Newsgroups gmane.linux.keepalived.announce
Message-ID <[email protected]>
I have spent quite a bit of time in google trying to find samples on
how to code my own MISC_CHECK.  My second quest is to find where and
how I can code the call to my MISC_CHECK inside my KEEPALIVED.CONF
files.  The samples for TCP_CHEKC and HTTP_GET I have found apply to
real-servers.  I am not using such parameter but I suspect I will have
to.

I have set up KeepAlived to provide me with a fail-over capability
between two servers running my own application.  The data in the
application gets syncronized between both servers while some other
data is kept via NFS mounted on both servers (exported from a 3rd
server).

Both servers have only one Ethernet Interface (ETH0) under SLES 10.0.
What I would like to do is write my own perl script to check on
various conditions to determine if the server is functioning or not.
 From reading the user guide, I can send a return code of -1 to
indicate the TEST FAILED so the fail-over can take place.


This is a sample for the MASTER server /etc/keepalived/keepalived.conf file.

vrrp_instance VI_1 {
 state MASTER
 interface eth0
 virtual_router_id 1
 priority 100
 authentication {
  auth_type PASS
  auth_pass concha
 }
 virtual_ipaddress {
  192.168.10.101/24 brd 192.168.10.255 dev eth0
 }
}

This is a sample for the BACKUP server /etc/keepalived/keepalived.conf file.

vrrp_instance VI_1 {
 state BACKUP
 interface eth0
 virtual_router_id 1
 priority 50
 authentication {
  auth_type PASS
  auth_pass concha
 }
 virtual_ipaddress {
  192.168.10.101/24 brd 192.168.10.255 dev eth0
 }
}

Notice that the VIP is 192.168.10.101.  MASTER is at 192.168.10.183
and BACKUP is at 192.168.10.200.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642