Skip to content
Snippets Groups Projects
Commit 0a2b80ee authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Use Docker healthchecks for haproxy services"

parents a29bfbf8 35e15a77
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ haproxy_services:
privileged: True
volumes: "{{ haproxy_default_volumes + haproxy_extra_volumes }}"
dimensions: "{{ haproxy_dimensions }}"
healthcheck: "{{ haproxy_healthcheck }}"
keepalived:
container_name: keepalived
group: haproxy
......@@ -49,6 +50,19 @@ haproxy_defaults_max_connections: 10000
haproxy_dimensions: "{{ default_container_dimensions }}"
keepalived_dimensions: "{{ default_container_dimensions }}"
haproxy_enable_healthchecks: "{{ enable_container_healthchecks }}"
haproxy_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
haproxy_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
haproxy_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
haproxy_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ haproxy_monitor_port }}"]
haproxy_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
haproxy_healthcheck:
interval: "{{ haproxy_healthcheck_interval }}"
retries: "{{ haproxy_healthcheck_retries }}"
start_period: "{{ haproxy_healthcheck_start_period }}"
test: "{% if haproxy_enable_healthchecks | bool %}{{ haproxy_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ haproxy_healthcheck_timeout }}"
haproxy_default_volumes:
- "{{ node_config_directory }}/haproxy/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
......
......@@ -59,6 +59,7 @@
privileged: "{{ service.privileged | default(False) }}"
volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- groups.kolla_ha_is_master_False is defined
......@@ -137,6 +138,7 @@
privileged: "{{ service.privileged | default(False) }}"
volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- groups.kolla_ha_is_master_True is defined
......
......@@ -8,6 +8,7 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
privileged: "{{ item.value.privileged | default(False) }}"
when:
- inventory_hostname in groups[item.value.group]
......
---
features:
- |
Implements container healthchecks for haproxy services.
See `blueprint
<https://blueprints.launchpad.net/kolla-ansible/+spec/container-health-check>`__
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