~openstack-charm-sync/charms/trusty/openstack-dashboard/stable

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg

  • Committer: James Page
  • Date: 2015-12-10 10:54:05 UTC
  • mfrom: (94.1.2 stable.remote)
  • Revision ID: james.page@ubuntu.com-20151210105405-uckv8u6kd2lhxff1
Add sane haproxy timeout defaults and make them configurable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
    option tcplog
13
13
    option dontlognull
14
14
    retries 3
15
 
    timeout queue 1000
16
 
    timeout connect 1000
17
 
{% if haproxy_client_timeout -%}
 
15
{%- if haproxy_queue_timeout %}
 
16
    timeout queue {{ haproxy_queue_timeout }}
 
17
{%- else %}
 
18
    timeout queue 5000
 
19
{%- endif %}
 
20
{%- if haproxy_connect_timeout %}
 
21
    timeout connect {{ haproxy_connect_timeout }}
 
22
{%- else %}
 
23
    timeout connect 5000
 
24
{%- endif %}
 
25
{%- if haproxy_client_timeout %}
18
26
    timeout client {{ haproxy_client_timeout }}
19
 
{% else -%}
 
27
{%- else %}
20
28
    timeout client 30000
21
 
{% endif -%}
22
 
 
23
 
{% if haproxy_server_timeout -%}
 
29
{%- endif %}
 
30
{%- if haproxy_server_timeout %}
24
31
    timeout server {{ haproxy_server_timeout }}
25
 
{% else -%}
 
32
{%- else %}
26
33
    timeout server 30000
27
 
{% endif -%}
 
34
{%- endif %}
28
35
 
29
36
listen stats {{ stat_port }}
30
37
    mode http