Many years ago change Ida7949113594b9b859ab7b4ba8b2bb440bab6e7d attempted to change the timeouts of haproxy but did not succeed, as deployments were still using the values from the charm's templates/haproxy.cfg file, being effectively set to 30 seconds and causing timeouts (see bug). Additionally, the description of the config options became inaccurate, stating the default to be a value that they were really not. This patch addresses the timeout value discrepancy, adjusting to the original change's intended values. Closes-bug: #2045168 Change-Id: I83405727b4a116ec6f47b61211bf8ef3d2d9fbd6 (cherry picked from commit09c5871160) (cherry picked from commit2f430d15e6) (cherry picked from commitf013b18c76) (cherry picked from commitf6f60a37ba) (cherry picked from commit62777b150b) (cherry picked from commitfb63730e63)
59 lines
1.4 KiB
INI
59 lines
1.4 KiB
INI
global
|
|
log {{ local_host }} local0
|
|
log {{ local_host }} local1 notice
|
|
maxconn 20000
|
|
user haproxy
|
|
group haproxy
|
|
spread-checks 0
|
|
|
|
defaults
|
|
log global
|
|
mode tcp
|
|
option tcplog
|
|
option dontlognull
|
|
retries 3
|
|
{%- if haproxy_queue_timeout %}
|
|
timeout queue {{ haproxy_queue_timeout }}
|
|
{%- else %}
|
|
timeout queue 9000
|
|
{%- endif %}
|
|
{%- if haproxy_connect_timeout %}
|
|
timeout connect {{ haproxy_connect_timeout }}
|
|
{%- else %}
|
|
timeout connect 9000
|
|
{%- endif %}
|
|
{%- if haproxy_client_timeout %}
|
|
timeout client {{ haproxy_client_timeout }}
|
|
{%- else %}
|
|
timeout client 90000
|
|
{%- endif %}
|
|
{%- if haproxy_server_timeout %}
|
|
timeout server {{ haproxy_server_timeout }}
|
|
{%- else %}
|
|
timeout server 90000
|
|
{%- endif %}
|
|
|
|
listen stats
|
|
bind {% if haproxy_expose_stats %}{{ haproxy_host }}{% else %}{{ local_host }}{% endif %}:{{ stat_port }}
|
|
mode http
|
|
stats enable
|
|
stats hide-version
|
|
stats realm Haproxy\ Statistics
|
|
stats uri /
|
|
stats auth admin:{{ stat_password }}
|
|
|
|
{% if units %}
|
|
{% for service, ports in service_ports.items() -%}
|
|
listen {{ service }}
|
|
bind *:{{ ports[0] }}
|
|
{% if prefer_ipv6 -%}
|
|
bind :::{{ ports[0] }}
|
|
{%- endif %}
|
|
balance source
|
|
option tcplog
|
|
{% for unit, address in units.items() -%}
|
|
server {{ unit }} {{ address }}:{{ ports[1] }} check
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|