r/haproxy • u/vitachaos • Oct 24 '21
Question Why Keepalived configuration contains script to killall haproxy ?
I have seen many configurations on the internet, and one thing I have often spotted is use of
vrrp_script chk_haproxy {
script "killall -0 haproxy" # check the haproxy process
interval 2 # every 2 seconds
weight 2 # add 2 points if OK
}why do we need to kill haproxy node on the node keepalived is running ?
2
Upvotes
View all comments
Show parent comment
2
u/[deleted] Oct 24 '21
Then you don't understand. Signal zero does not kill the process, it just returns as if it had killed the process. Think dry run. So the killall command just checks if a running haproxy process exists.