Merge "Use Docker healthchecks for ironic services"
This commit is contained in:
commit
4aa44f2caa
@ -9,6 +9,7 @@ ironic_services:
|
|||||||
image: "{{ ironic_api_image_full }}"
|
image: "{{ ironic_api_image_full }}"
|
||||||
volumes: "{{ ironic_api_default_volumes + ironic_api_extra_volumes }}"
|
volumes: "{{ ironic_api_default_volumes + ironic_api_extra_volumes }}"
|
||||||
dimensions: "{{ ironic_api_dimensions }}"
|
dimensions: "{{ ironic_api_dimensions }}"
|
||||||
|
healthcheck: "{{ ironic_api_healthcheck }}"
|
||||||
haproxy:
|
haproxy:
|
||||||
ironic_api:
|
ironic_api:
|
||||||
enabled: "{{ enable_ironic }}"
|
enabled: "{{ enable_ironic }}"
|
||||||
@ -32,6 +33,7 @@ ironic_services:
|
|||||||
privileged: True
|
privileged: True
|
||||||
volumes: "{{ ironic_conductor_default_volumes + ironic_conductor_extra_volumes }}"
|
volumes: "{{ ironic_conductor_default_volumes + ironic_conductor_extra_volumes }}"
|
||||||
dimensions: "{{ ironic_conductor_dimensions }}"
|
dimensions: "{{ ironic_conductor_dimensions }}"
|
||||||
|
healthcheck: "{{ ironic_conductor_healthcheck }}"
|
||||||
ironic-inspector:
|
ironic-inspector:
|
||||||
container_name: ironic_inspector
|
container_name: ironic_inspector
|
||||||
group: ironic-inspector
|
group: ironic-inspector
|
||||||
@ -40,6 +42,7 @@ ironic_services:
|
|||||||
privileged: True
|
privileged: True
|
||||||
volumes: "{{ ironic_inspector_default_volumes + ironic_inspector_extra_volumes }}"
|
volumes: "{{ ironic_inspector_default_volumes + ironic_inspector_extra_volumes }}"
|
||||||
dimensions: "{{ ironic_inspector_dimensions }}"
|
dimensions: "{{ ironic_inspector_dimensions }}"
|
||||||
|
healthcheck: "{{ ironic_inspector_healthcheck }}"
|
||||||
haproxy:
|
haproxy:
|
||||||
ironic_inspector:
|
ironic_inspector:
|
||||||
enabled: "{{ enable_ironic }}"
|
enabled: "{{ enable_ironic }}"
|
||||||
@ -67,6 +70,7 @@ ironic_services:
|
|||||||
image: "{{ ironic_pxe_image_full }}"
|
image: "{{ ironic_pxe_image_full }}"
|
||||||
volumes: "{{ ironic_ipxe_default_volumes + ironic_ipxe_extra_volumes }}"
|
volumes: "{{ ironic_ipxe_default_volumes + ironic_ipxe_extra_volumes }}"
|
||||||
dimensions: "{{ ironic_ipxe_dimensions }}"
|
dimensions: "{{ ironic_ipxe_dimensions }}"
|
||||||
|
healthcheck: "{{ ironic_ipxe_healthcheck }}"
|
||||||
ironic-dnsmasq:
|
ironic-dnsmasq:
|
||||||
container_name: ironic_dnsmasq
|
container_name: ironic_dnsmasq
|
||||||
group: ironic-inspector
|
group: ironic-inspector
|
||||||
@ -123,6 +127,58 @@ ironic_ipxe_dimensions: "{{ default_container_dimensions }}"
|
|||||||
ironic_inspector_dimensions: "{{ default_container_dimensions }}"
|
ironic_inspector_dimensions: "{{ default_container_dimensions }}"
|
||||||
ironic_dnsmasq_dimensions: "{{ default_container_dimensions }}"
|
ironic_dnsmasq_dimensions: "{{ default_container_dimensions }}"
|
||||||
|
|
||||||
|
ironic_api_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
ironic_api_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
ironic_api_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
ironic_api_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
ironic_api_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ ironic_api_listen_port }}"]
|
||||||
|
ironic_api_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
ironic_api_healthcheck:
|
||||||
|
interval: "{{ ironic_api_healthcheck_interval }}"
|
||||||
|
retries: "{{ ironic_api_healthcheck_retries }}"
|
||||||
|
start_period: "{{ ironic_api_healthcheck_start_period }}"
|
||||||
|
test: "{% if ironic_api_enable_healthchecks | bool %}{{ ironic_api_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ ironic_api_healthcheck_timeout }}"
|
||||||
|
|
||||||
|
ironic_conductor_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
ironic_conductor_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
ironic_conductor_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
ironic_conductor_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
ironic_conductor_healthcheck_test: ["CMD-SHELL", "healthcheck_port ironic-conductor {{ om_rpc_port }}"]
|
||||||
|
ironic_conductor_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
ironic_conductor_healthcheck:
|
||||||
|
interval: "{{ ironic_conductor_healthcheck_interval }}"
|
||||||
|
retries: "{{ ironic_conductor_healthcheck_retries }}"
|
||||||
|
start_period: "{{ ironic_conductor_healthcheck_start_period }}"
|
||||||
|
test: "{% if ironic_conductor_enable_healthchecks | bool %}{{ ironic_conductor_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ ironic_conductor_healthcheck_timeout }}"
|
||||||
|
|
||||||
|
ironic_inspector_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
ironic_inspector_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
ironic_inspector_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
ironic_inspector_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
ironic_inspector_healthcheck_test: ["CMD-SHELL", "healthcheck_port ironic-inspector {{ om_rpc_port }}"]
|
||||||
|
ironic_inspector_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
ironic_inspector_healthcheck:
|
||||||
|
interval: "{{ ironic_inspector_healthcheck_interval }}"
|
||||||
|
retries: "{{ ironic_inspector_healthcheck_retries }}"
|
||||||
|
start_period: "{{ ironic_inspector_healthcheck_start_period }}"
|
||||||
|
test: "{% if ironic_inspector_enable_healthchecks | bool %}{{ ironic_inspector_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ ironic_inspector_healthcheck_timeout }}"
|
||||||
|
|
||||||
|
ironic_ipxe_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
ironic_ipxe_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
ironic_ipxe_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
ironic_ipxe_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
ironic_ipxe_healthcheck_test: ["CMD-SHELL", "healthcheck_listen httpd {{ ironic_ipxe_port }}"]
|
||||||
|
ironic_ipxe_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
ironic_ipxe_healthcheck:
|
||||||
|
interval: "{{ ironic_ipxe_healthcheck_interval }}"
|
||||||
|
retries: "{{ ironic_ipxe_healthcheck_retries }}"
|
||||||
|
start_period: "{{ ironic_ipxe_healthcheck_start_period }}"
|
||||||
|
test: "{% if ironic_ipxe_enable_healthchecks | bool %}{{ ironic_ipxe_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ ironic_ipxe_healthcheck_timeout }}"
|
||||||
|
|
||||||
ironic_api_default_volumes:
|
ironic_api_default_volumes:
|
||||||
- "{{ node_config_directory }}/ironic-api/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/ironic-api/:{{ container_config_directory }}/:ro"
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
privileged: "{{ service.privileged | default(False) }}"
|
privileged: "{{ service.privileged | default(False) }}"
|
||||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
|
||||||
@ -27,6 +28,7 @@
|
|||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
|
||||||
@ -63,6 +65,7 @@
|
|||||||
privileged: "{{ service.privileged | default(False) }}"
|
privileged: "{{ service.privileged | default(False) }}"
|
||||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
|
||||||
@ -93,6 +96,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:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
cap_add: "{{ item.value.cap_add|default([]) }}"
|
cap_add: "{{ item.value.cap_add|default([]) }}"
|
||||||
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
|
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
|
||||||
dimensions: "{{ item.value.dimensions }}"
|
dimensions: "{{ item.value.dimensions }}"
|
||||||
|
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[item.value.group]
|
- inventory_hostname in groups[item.value.group]
|
||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Implements container healthchecks for ironic services.
|
||||||
|
See `blueprint
|
||||||
|
<https://blueprints.launchpad.net/kolla-ansible/+spec/container-health-check>`__
|
Loading…
Reference in New Issue
Block a user