Only do http health check when requested.

The default health check for Haproxy is a TCP health check
so we should only enable the HTTP health check when the
backend service requests it.

Change-Id: I68d9a136ca52f272b076332efec85776eda45116
This commit is contained in:
Chris MacNaughton 2022-02-02 12:28:38 +01:00
parent 52c8e1914a
commit 666c93dacb
4 changed files with 11 additions and 0 deletions

View File

@ -1 +1,2 @@
git+https://github.com/canonical/charmcraft.git@0.10.2#egg=charmcraft
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35

View File

@ -23,9 +23,15 @@ frontend {{service}}_front
backend {{service}}_back
mode tcp
{%- if service_config.check_type == 'http' %}
option httpchk GET /
http-check expect status 200
{%- endif %}
{%- for unit in service_config.members %}
{%- if service_config.check_type == 'http' %}
server {{ unit.unit_name }} {{ unit.backend_ip }}:{{ unit.backend_port }} check-ssl check verify none
{%- else %}
server {{ unit.unit_name }} {{ unit.backend_ip }}:{{ unit.backend_port }} check
{%- endif %}
{%- endfor %}
{% endfor %}

View File

@ -15,3 +15,4 @@ git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
pytz # workaround for 14.04 pip/tox
pyudev # for ceph-* charm unit tests (not mocked?)
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35

View File

@ -14,3 +14,6 @@ target_deploy_status:
vault:
workload-status: blocked
workload-status-message-prefix: Vault needs to be initialized
tests_options:
force_deploy:
- hirsute