Use Docker healthchecks for memcached services
This change enables the use of Docker healthchecks for memcached services. Implements: blueprint container-health-check Change-Id: I571e6d6cac634fd86429e12b946d6f7b4a2ab02c
This commit is contained in:
parent
0a2b80eed8
commit
3c1fd44092
@ -9,6 +9,7 @@ memcached_services:
|
|||||||
group: "memcached"
|
group: "memcached"
|
||||||
volumes: "{{ memcached_default_volumes + memcached_extra_volumes }}"
|
volumes: "{{ memcached_default_volumes + memcached_extra_volumes }}"
|
||||||
dimensions: "{{ memcached_dimensions }}"
|
dimensions: "{{ memcached_dimensions }}"
|
||||||
|
healthcheck: "{{ memcached_healthcheck }}"
|
||||||
haproxy:
|
haproxy:
|
||||||
memcached:
|
memcached:
|
||||||
enabled: "{{ enable_memcached|bool and enable_haproxy_memcached|bool }}"
|
enabled: "{{ enable_memcached|bool and enable_haproxy_memcached|bool }}"
|
||||||
@ -36,6 +37,19 @@ memcached_tag: "{{ openstack_tag }}"
|
|||||||
memcached_image_full: "{{ memcached_image }}:{{ memcached_tag }}"
|
memcached_image_full: "{{ memcached_image }}:{{ memcached_tag }}"
|
||||||
memcached_dimensions: "{{ default_container_dimensions }}"
|
memcached_dimensions: "{{ default_container_dimensions }}"
|
||||||
|
|
||||||
|
memcached_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
memcached_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
memcached_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
memcached_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
memcached_healthcheck_test: ["CMD-SHELL", "healthcheck_listen memcached {{ memcached_port }}"]
|
||||||
|
memcached_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
memcached_healthcheck:
|
||||||
|
interval: "{{ memcached_healthcheck_interval }}"
|
||||||
|
retries: "{{ memcached_healthcheck_retries }}"
|
||||||
|
start_period: "{{ memcached_healthcheck_start_period }}"
|
||||||
|
test: "{% if memcached_enable_healthchecks | bool %}{{ memcached_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ memcached_healthcheck_timeout }}"
|
||||||
|
|
||||||
memcached_default_volumes:
|
memcached_default_volumes:
|
||||||
- "{{ node_config_directory }}/memcached/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/memcached/:{{ container_config_directory }}/:ro"
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
@ -10,5 +10,6 @@
|
|||||||
name: "{{ service.container_name }}"
|
name: "{{ service.container_name }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Implements container healthchecks for memcached services.
|
||||||
|
See `blueprint
|
||||||
|
<https://blueprints.launchpad.net/kolla-ansible/+spec/container-health-check>`__
|
Loading…
Reference in New Issue
Block a user