diff options
| author | Sam Yaple <sam@yaple.net> | 2015-08-05 11:10:53 +0000 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-08-05 11:10:53 +0000 |
| commit | 8ede380f1d4d702bf29ea31e6f66dafd8518c759 (patch) | |
| tree | 40bcc7693fff624d48dd96b9bebf2339b7bb1f57 /docker/common/keepalived | |
| parent | 12b70241badd498ed3bfda3788ea5597898e99cb (diff) | |
| download | kolla-8ede380f1d4d702bf29ea31e6f66dafd8518c759.tar.gz kolla-8ede380f1d4d702bf29ea31e6f66dafd8518c759.zip | |
Add check_script for haproxy in keepalived
This patch checks that haproxy is alive and running. It does this by
using socat to talk to the haproxy socket. That socket will only
respond successfully when haproxy is active and functional.
Change-Id: I528588d5742071103c28109a69842a6f935232c2
Closes-Bug: #1478570
Diffstat (limited to 'docker/common/keepalived')
| -rwxr-xr-x | docker/common/keepalived/check_alive.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docker/common/keepalived/check_alive.sh b/docker/common/keepalived/check_alive.sh index ee0c5a85b..8c2684f10 100755 --- a/docker/common/keepalived/check_alive.sh +++ b/docker/common/keepalived/check_alive.sh @@ -1,7 +1,6 @@ #!/bin/bash -# This is noop check script. Change it to something meaningful. -# TODO (inc0): When HAProxy is implemented, this should be changed to HAProxy check -# https://github.com/stackforge/kolla/blob/master/specs/high-availability.rst +# This will return 0 when it successfully talks to the haproxy daemon via the socket +# Failures return 1 -exit 0 +echo "show info" | socat unix-connect:/run/haproxy.sock stdio |
