openvswitch: Add healthchecks
Depends-On: https://review.opendev.org/c/openstack/kolla/+/782815 Change-Id: I5230f017f1fa99629b81d944ba245c5778411b1f
This commit is contained in:
parent
d1e7964a8d
commit
df06af99e3
@ -17,6 +17,7 @@ openvswitch_services:
|
||||
}}
|
||||
volumes: "{{ openvswitch_db_default_volumes + openvswitch_db_extra_volumes }}"
|
||||
dimensions: "{{ openvswitch_db_dimensions }}"
|
||||
healthcheck: "{{ openvswitch_db_healthcheck }}"
|
||||
openvswitch-vswitchd:
|
||||
container_name: "openvswitch_vswitchd"
|
||||
image: "{{ openvswitch_vswitchd_image_full }}"
|
||||
@ -33,6 +34,7 @@ openvswitch_services:
|
||||
privileged: True
|
||||
volumes: "{{ openvswitch_vswitchd_default_volumes + openvswitch_vswitchd_extra_volumes }}"
|
||||
dimensions: "{{ openvswitch_vswitchd_dimensions }}"
|
||||
healthcheck: "{{ openvswitch_vswitchd_healthcheck }}"
|
||||
|
||||
####################
|
||||
# Docker
|
||||
@ -51,6 +53,32 @@ openvswitch_vswitchd_image_full: "{{ openvswitch_vswitchd_image }}:{{ openvswitc
|
||||
openvswitch_db_dimensions: "{{ default_container_dimensions }}"
|
||||
openvswitch_vswitchd_dimensions: "{{ default_container_dimensions }}"
|
||||
|
||||
openvswitch_db_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||
openvswitch_db_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||
openvswitch_db_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||
openvswitch_db_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||
openvswitch_db_healthcheck_test: ["CMD-SHELL", "healthcheck_socket ovsdb-server /run/openvswitch/db.sock"]
|
||||
openvswitch_db_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||
openvswitch_db_healthcheck:
|
||||
interval: "{{ openvswitch_db_healthcheck_interval }}"
|
||||
retries: "{{ openvswitch_db_healthcheck_retries }}"
|
||||
start_period: "{{ openvswitch_db_healthcheck_start_period }}"
|
||||
test: "{% if openvswitch_db_enable_healthchecks | bool %}{{ openvswitch_db_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||
timeout: "{{ openvswitch_db_healthcheck_timeout }}"
|
||||
|
||||
openvswitch_vswitchd_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||
openvswitch_vswitchd_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||
openvswitch_vswitchd_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||
openvswitch_vswitchd_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||
openvswitch_vswitchd_healthcheck_test: ["CMD-SHELL", "ovs-appctl version"]
|
||||
openvswitch_vswitchd_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||
openvswitch_vswitchd_healthcheck:
|
||||
interval: "{{ openvswitch_vswitchd_healthcheck_interval }}"
|
||||
retries: "{{ openvswitch_vswitchd_healthcheck_retries }}"
|
||||
start_period: "{{ openvswitch_vswitchd_healthcheck_start_period }}"
|
||||
test: "{% if openvswitch_vswitchd_enable_healthchecks | bool %}{{ openvswitch_vswitchd_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||
timeout: "{{ openvswitch_vswitchd_healthcheck_timeout }}"
|
||||
|
||||
openvswitch_db_default_volumes:
|
||||
- "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
|
@ -11,6 +11,7 @@
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
healthcheck: "{{ service.healthcheck }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
notify:
|
||||
@ -38,5 +39,6 @@
|
||||
volumes: "{{ service.volumes }}"
|
||||
privileged: "{{ service.privileged | default(False) }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
healthcheck: "{{ service.healthcheck }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
|
@ -9,6 +9,7 @@
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck }}"
|
||||
when:
|
||||
- item.value.enabled | bool
|
||||
- item.value.host_in_groups | bool
|
||||
|
Loading…
Reference in New Issue
Block a user