Merge "Add check_script for haproxy in keepalived"

This commit is contained in:
Jenkins 2015-08-07 18:38:43 +00:00 committed by Gerrit Code Review
commit 4811fd7251
4 changed files with 8 additions and 6 deletions
ansible/roles/haproxy
docker/common/keepalived

@ -6,6 +6,7 @@
container_privileged: "True"
container_volumes:
- "{{ node_config_directory }}/keepalived/:/opt/kolla/keepalived/:ro"
- "/run:/run"
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
@ -15,6 +16,7 @@
container_name: "haproxy"
container_volumes:
- "{{ node_config_directory }}/haproxy/:/opt/kolla/haproxy/:ro"
- "/run:/run"
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"

@ -1,10 +1,10 @@
global
daemon
maxconn 4000
stats socket /run/haproxy.sock
defaults
mode http
maxconn 4000
option redispatch
retries 3
timeout http-request 10s

@ -1,7 +1,8 @@
vrrp_script check_alive {
script "/check_alive.sh"
interval 2
weight -10
fall 2
rise 10
}
vrrp_instance Floating {

@ -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