From: Frédéric DONNAT on
Hi all,



I'm wondering if I could find some VRRP expert who could help me.. ^^



I'm trying to set UP an High Availability Service for a MTA.

I've installed two box with debian lenny and a MTA and i'm trying to set keepalived and those server.

I want to set both server as backup, so the first UP will be elected MASTER, and then this avoid double switch when a faulting node become available again.



Everything seems working fine except that I could not disable premption.





Package version

ii ipvsadm 1:1.24-2.1 Linux Virtual Server support programs

ii keepalived 1.1.15-1 Failover and monitoring daemon for LVS clusters



Here is my conf:

==============

global_defs {

router_id LVS_HA_2

}



vrrp_instance VI_1 {

state BACKUP

interface eth0

virtual_router_id 13

priority 25

authentication {

auth_type PASS

auth_pass mailinblack

}

virtual_ipaddress {

192.168.11.232/24 brd 192.168.11.255 dev eth0 label eth0:1

}

Nopreempt # try to avoid preemption with BACKUP state

notify_master "/root/notify.sh MASTER"

notify_backup "/root/notify.sh BACKUP"

notify_fault "/root/notify.sh FAULT"

#notify /root/notify.sh

#smtp_alert

}



virtual_server 192.168.11.232 25 {

delay_loop 10

lb_algo wrr

lb_kind DR

persistence_timeout 10

protocol TCP

ha_suspend # I disable heal checker is current node is not available

real_server 192.168.11.131 25 {

weigth 25

#inhibit_on_failure # I try both whith and whithout this and that makes no change

notify_up "/root/notify_rs.sh UP MTA"

notify_down "/root/notify_rs.sh DOWN MTA"

SMTP_CHECK {

# Postfix IN

host {

connect_ip 192.168.11.131

connect_port 25

bindto 127.0.0.1

}

connect_timeout 10

retry 3

delay_before_retry 20

helo_name "High Availability Checker"

}

}

}



Script:

======

My script allow me to switch from backup and slave when healtchecker detects a failure (de activate and activate network link)



If someone could help me or point me in the right direction.. ;)



Tanks in advance



Fred