Add support for HAProxy L7 checks
This change add several configuration options to enable HTTP checks to the HAProxy configuration, instead of the default TCP connection checks. Closes-Bug: #1880610 Change-Id: Ie1f53d38c1c45ce3b2ddf5041eaa04a7f3139066
This commit is contained in:
parent
843fab27bd
commit
c29a1c7b8e
|
@ -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
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ dev_bundles:
|
|||
|
||||
smoke_bundles:
|
||||
# Use no s3api test for smoke
|
||||
- focal-yoga
|
||||
- jammy-yoga
|
||||
|
||||
configure:
|
||||
- swift_gr_region1:
|
||||
|
|
Loading…
Reference in New Issue