diff --git a/lib/swift_context.py b/lib/swift_context.py index f2f9642..3afe23e 100644 --- a/lib/swift_context.py +++ b/lib/swift_context.py @@ -22,6 +22,7 @@ from charmhelpers.contrib.openstack.context import ( from charmhelpers.contrib.hahelpers.cluster import ( determine_api_port, determine_apache_port, + https, ) from charmhelpers.contrib.network.ip import ( format_ipv6_addr, @@ -54,8 +55,17 @@ class HAProxyContext(OSContextGenerator): api_port = determine_apache_port(config('bind-port'), singlenode_mode=True) + healthcheck = [{ + 'option': 'httpchk GET /healthcheck', + 'http-check': 'expect status 200', + }] + + backend_options = {'swift_api': healthcheck} + ctxt = { 'service_ports': {'swift_api': [haproxy_port, api_port]}, + 'backend_options': backend_options, + 'https': https() } return ctxt diff --git a/tests/tests.yaml b/tests/tests.yaml index 5d8cd9c..71c6685 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -10,7 +10,7 @@ dev_bundles: smoke_bundles: # Use no s3api test for smoke - - focal-yoga + - jammy-yoga configure: - swift_gr_region1: diff --git a/tox.ini b/tox.ini index ae4d124..2cb6ca1 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ setenv = VIRTUAL_ENV={envdir} commands = stestr run --slowest {posargs} allowlist_externals = charmcraft - rename.sh + {toxinidir}/rename.sh passenv = HOME TERM