Skip to content
Snippets Groups Projects
Commit df06af99 authored by Michał Nasiadka's avatar Michał Nasiadka Committed by Michal Nasiadka
Browse files

openvswitch: Add healthchecks

Depends-On: https://review.opendev.org/c/openstack/kolla/+/782815
Change-Id: I5230f017f1fa99629b81d944ba245c5778411b1f
parent d1e7964a
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ openvswitch_services: ...@@ -17,6 +17,7 @@ openvswitch_services:
}} }}
volumes: "{{ openvswitch_db_default_volumes + openvswitch_db_extra_volumes }}" volumes: "{{ openvswitch_db_default_volumes + openvswitch_db_extra_volumes }}"
dimensions: "{{ openvswitch_db_dimensions }}" dimensions: "{{ openvswitch_db_dimensions }}"
healthcheck: "{{ openvswitch_db_healthcheck }}"
openvswitch-vswitchd: openvswitch-vswitchd:
container_name: "openvswitch_vswitchd" container_name: "openvswitch_vswitchd"
image: "{{ openvswitch_vswitchd_image_full }}" image: "{{ openvswitch_vswitchd_image_full }}"
...@@ -33,6 +34,7 @@ openvswitch_services: ...@@ -33,6 +34,7 @@ openvswitch_services:
privileged: True privileged: True
volumes: "{{ openvswitch_vswitchd_default_volumes + openvswitch_vswitchd_extra_volumes }}" volumes: "{{ openvswitch_vswitchd_default_volumes + openvswitch_vswitchd_extra_volumes }}"
dimensions: "{{ openvswitch_vswitchd_dimensions }}" dimensions: "{{ openvswitch_vswitchd_dimensions }}"
healthcheck: "{{ openvswitch_vswitchd_healthcheck }}"
#################### ####################
# Docker # Docker
...@@ -51,6 +53,32 @@ openvswitch_vswitchd_image_full: "{{ openvswitch_vswitchd_image }}:{{ openvswitc ...@@ -51,6 +53,32 @@ openvswitch_vswitchd_image_full: "{{ openvswitch_vswitchd_image }}:{{ openvswitc
openvswitch_db_dimensions: "{{ default_container_dimensions }}" openvswitch_db_dimensions: "{{ default_container_dimensions }}"
openvswitch_vswitchd_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: openvswitch_db_default_volumes:
- "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
image: "{{ service.image }}" image: "{{ service.image }}"
volumes: "{{ service.volumes }}" volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck }}"
when: when:
- kolla_action != "config" - kolla_action != "config"
notify: notify:
...@@ -38,5 +39,6 @@ ...@@ -38,5 +39,6 @@
volumes: "{{ service.volumes }}" volumes: "{{ service.volumes }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck }}"
when: when:
- kolla_action != "config" - kolla_action != "config"
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
privileged: "{{ item.value.privileged | default(False) }}" privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}" volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}" dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck }}"
when: when:
- item.value.enabled | bool - item.value.enabled | bool
- item.value.host_in_groups | bool - item.value.host_in_groups | bool
......
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