Re: Keepalived startup and check/track script
Quentin Armitage <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Organization | The Armitage family |
| Message-ID | <[email protected]> |
On Tue, 2016-10-25 at 17:37 +0000, Sébastien WENSKE wrote:
> Hi List,
>
> I use keepalived to failover two haproxy servers, each have a vrrp_script:
>
> vrrp_script check_haproxy {
> script "killall -0 haproxy"
> interval 2
> }
>
> I have one vrrp_instance who is tracking the vrrp_script:
>
> track_script {
> check_haproxy
> }
>
> I have an issue when the server starts, HAProxy can't start automatically until I unlock a crypted partition, but Keepalived starts.
> So, when I restart the "Master" server, the "Backup" become "Master" as expected.
> But, when the "Master" restarts, Keepalived switches to the Master state while HAProxy is not ready, the "Backup" get back to its initial state (that's bad). Then a Master election starts and the "Master" switches to the "Fail" state. This startup behavior causes a few seconds outage.
>
> Is there a way that the tracking script is considered before anything else ?
Sebastien,
I am in the middle of a rather large update to keepalived that amongst
other things makes keepalived react much faster to script and interface
status changes. Part of that is that a vrrp instance is considered to be
in the fault state at startup if it has any unweighted tracking scripts,
until the script has returned successfully. I think this is exactly what
you are asking for.
With regards,
Quentin Armitage
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel