Skip to content
Snippets Groups Projects
Commit 4811fd72 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add check_script for haproxy in keepalived"

parents a5e907a8 8ede380f
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
container_privileged: "True" container_privileged: "True"
container_volumes: container_volumes:
- "{{ node_config_directory }}/keepalived/:/opt/kolla/keepalived/:ro" - "{{ node_config_directory }}/keepalived/:/opt/kolla/keepalived/:ro"
- "/run:/run"
container_environment: container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
container_name: "haproxy" container_name: "haproxy"
container_volumes: container_volumes:
- "{{ node_config_directory }}/haproxy/:/opt/kolla/haproxy/:ro" - "{{ node_config_directory }}/haproxy/:/opt/kolla/haproxy/:ro"
- "/run:/run"
container_environment: container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
......
global global
daemon daemon
maxconn 4000 maxconn 4000
stats socket /run/haproxy.sock
defaults defaults
mode http mode http
maxconn 4000
option redispatch option redispatch
retries 3 retries 3
timeout http-request 10s timeout http-request 10s
......
vrrp_script check_alive { vrrp_script check_alive {
script "/check_alive.sh" script "/check_alive.sh"
interval 2 interval 2
weight -10 fall 2
rise 10
} }
vrrp_instance Floating { vrrp_instance Floating {
......
#!/bin/bash #!/bin/bash
# This is noop check script. Change it to something meaningful. # This will return 0 when it successfully talks to the haproxy daemon via the socket
# TODO (inc0): When HAProxy is implemented, this should be changed to HAProxy check # Failures return 1
# https://github.com/stackforge/kolla/blob/master/specs/high-availability.rst
exit 0 echo "show info" | socat unix-connect:/run/haproxy.sock stdio
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment