kolla-ansible/docker/common/keepalived/check_alive.sh
Sam Yaple 8ede380f1d 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
2015-08-05 11:10:53 +00:00

7 lines
181 B
Bash
Executable File

#!/bin/bash
# This will return 0 when it successfully talks to the haproxy daemon via the socket
# Failures return 1
echo "show info" | socat unix-connect:/run/haproxy.sock stdio