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: I4a947c5b52eb3283c08a0d39cc9bf14695a63eab
This commit is contained in:
parent
83b866eaac
commit
468d648655
|
@ -239,10 +239,22 @@ class HAProxyContext(ch_context.HAProxyContext):
|
|||
del listen_ports['placement_listen_port']
|
||||
del port_mapping['nova-placement-api']
|
||||
|
||||
healthcheck = [{
|
||||
'option': 'httpchk GET /',
|
||||
'http-check': 'expect status 200',
|
||||
}]
|
||||
|
||||
backend_options = {
|
||||
'nova-api-os-compute': healthcheck,
|
||||
'nova-api-metadata': healthcheck,
|
||||
}
|
||||
|
||||
# for haproxy.conf
|
||||
ctxt['service_ports'] = port_mapping
|
||||
# for nova.conf
|
||||
ctxt['listen_ports'] = listen_ports
|
||||
ctxt['backend_options'] = backend_options
|
||||
ctxt['https'] = ch_cluster.https()
|
||||
return ctxt
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue