notify scripts are not running
Matt Chan <[email protected]> Wed, 15 Feb 2006 09:12:12 -0500
| Newsgroups | gmane.linux.keepalived.announce |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have been having trouble getting director failovers to work on
my lvs. An initial failover will work if the main director were to
lose connection, but I dont think that its keepalived thats doing it.
When the main director comes back online, elections are held and the
transitions change, but the actual connection does not switch back
over. To get around this, I figured I would just write a script to
bring the particular eth0/1 interface up and down depending on the
state of the VIP. I have tried 2 scripts. One brings the interface
up/down, and the other is just a test script to create a temp file.
Neither script runs during state transitions.
/etc/keepalived/mine:
#!/bin/bash
/bin/echo "yay" >/tmp/yay
related keepalived.conf info:
## VRRP Instances Definitions
vrrp_sync_group VG1{
group{
VI_1
VI_2
VI_3
}
notify_master "/etc/keepalived/mine"
notify_backup "/etc/keepalived/mine"
notify_fault "/etc/keepalived/mine"
#notify_master "/sbin/masterState.sh"
#notify_backup "/sbin/backupState.sh"
#notify_fault "/sbin/backupState.sh"
}
vrrp_instance VI_1{
state MASTER
interface eth0
lvs_sync_daemon_interface eth0
#track_interface{
# eth0
#}
virtual_router_id 51
priority 150
advert_int 1
virtual_ipaddress{
165.230.111.208/32 dev eth1
}
notify_master "/etc/keepalived/mine"
notify_backup "/etc/keepalived/mine"
notify_fault "/etc/keepalived/mine"
smtp_alert
#notify_master "/sbin/masterState.sh"
#notify_backup "/sbin/backupState.sh"
#notify_fault "/sbin/backupState.sh"
}
vrrp_instance VI_2{
state MASTER
interface eth0
lvs_sync_daemon_interface eth0
virtual_router_id 52
priority 150
advert_int 1
virtual_ipaddress{
165.230.111.217/27 dev eth0
}
notify_master "/etc/keepalived/mine"
notify_backup "/etc/keepalived/mine"
notify_fault "/etc/keepalived/mine"
smtp_alert
}
vrrp_instance VI_3{
state BACKUP
interface eth0
lvs_sync_daemon_interface eth0
virtual_router_id 53
priority 100
advert_int 1
virtual_ipaddress{
165.230.111.218/27 dev eth0
}
notify_master "/etc/keepalived/mine"
notify_backup "/etc/keepalived/mine"
notify_fault "/etc/keepalived/mine"
smtp_alert
}
For VI_1, I tried the track interface option, and switched the regular
interface to eth1, but keepalived would get stuck in an infinite loop
and not start up.
Is there any particular flags I should have used during compile time
to use the notify features? The smtp alerts work fine. The scripts are
chmod 755 and owner:group is root:root.
Thanks
-Matt Chan
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642