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 /ansible | |
| 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 'ansible')
| -rwxr-xr-x | ansible/roles/haproxy/tasks/start.yml | 2 | ||||
| -rwxr-xr-x | ansible/roles/haproxy/templates/haproxy.cfg.j2 | 2 | ||||
| -rw-r--r-- | ansible/roles/haproxy/templates/keepalived.conf.j2 | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/ansible/roles/haproxy/tasks/start.yml b/ansible/roles/haproxy/tasks/start.yml index cda6c0cf3..ca7150915 100755 --- a/ansible/roles/haproxy/tasks/start.yml +++ b/ansible/roles/haproxy/tasks/start.yml @@ -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 }}" diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index 8fc65de14..11a334099 100755 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -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 diff --git a/ansible/roles/haproxy/templates/keepalived.conf.j2 b/ansible/roles/haproxy/templates/keepalived.conf.j2 index e2c37dab5..baba1fda6 100644 --- a/ansible/roles/haproxy/templates/keepalived.conf.j2 +++ b/ansible/roles/haproxy/templates/keepalived.conf.j2 @@ -1,7 +1,8 @@ vrrp_script check_alive { script "/check_alive.sh" interval 2 - weight -10 + fall 2 + rise 10 } vrrp_instance Floating { |
