Re: Keepalived track_script and failover
Sheldon Lee-Wen <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <103EEAB24688A147B5B2E39C44C71BF05009D33C@EX2010-MAIL2.jsitelecom.com> |
Ok so then my configs would look like this, right?
Host1:
global_defs {
notification_email {
<removed>
}
notification_email_from <removed>
smtp_server <removed>
smtp_connect_timeout 30
}
vrrp_script chk_haproxy {
script "killall -0 haproxy"
interval 1
weight -51
}
vrrp_instance VI_1 {
interface eth0
state BACKUP
virtual_router_id 51
priority 52
nopreempt
smtp_alert
authentication {
auth_type PASS
auth_pass 1234qwer
}
virtual_ipaddress {
192.168.12.5
192.168.12.10
}
track_script {
chk_haproxy
}
}
Host2:
global_defs {
notification_email {
<removed>
}
notification_email_from <removed>
smtp_server <removed>
smtp_connect_timeout 30
}
vrrp_script chk_haproxy {
script "killall -0 haproxy"
interval 1
weight -51
}
vrrp_instance VI_1 {
interface eth0
state BACKUP
virtual_router_id 51
priority 51
nopreempt
smtp_alert
authentication {
auth_type PASS
auth_pass 1234qwer
}
virtual_ipaddress {
192.168.12.5
192.168.12.10
}
track_script {
chk_haproxy
}
}
From: Paul Robert Marino [mailto:[email protected]]
Sent: July-16-13 1:18 AM
To: Sheldon Lee-Wen; [email protected]
Subject: Re: [Keepalived-devel] Keepalived track_script and failover
Add 2 to each of your priorities so they don't go into negative numbers on the secondary on a failure, and make the weight a -51 that will cause an offset of 50. In vrrp a differential of 50 supersedes a nopreempt
-- Sent from my HP Pre3
________________________________
On Jul 15, 2013 7:36 PM, Sheldon Lee-Wen <[email protected]<mailto:[email protected]>> wrote:
I made the requested changes and it works now. Fantastic. Thank you everyone!
Now, if I want to add nopreempt to prevent fail backs can I do that safely by just adding that keyword to each config file and setting a weight of -50 to the chk_haproxy script?
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel