Fix lp:1522130 Add sane haproxy timeout defaults and make them configurable.

This commit is contained in:
David Ames 2015-12-03 14:47:11 -08:00
parent ae463cb105
commit 42f8e6abca
2 changed files with 34 additions and 2 deletions

View File

@ -12,8 +12,16 @@ defaults
option tcplog option tcplog
option dontlognull option dontlognull
retries 3 retries 3
timeout queue 1000 {% if haproxy_queue_timeout -%}
timeout connect 1000 timeout queue {{ haproxy_queue_timeout }}
{% else -%}
timeout queue 5000
{% endif -%}
{% if haproxy_connect_timeout -%}
timeout connect {{ haproxy_connect_timeout }}
{% else -%}
timeout connect 5000
{% endif -%}
{% if haproxy_client_timeout -%} {% if haproxy_client_timeout -%}
timeout client {{ haproxy_client_timeout }} timeout client {{ haproxy_client_timeout }}
{% else -%} {% else -%}

View File

@ -308,3 +308,27 @@ options:
wait for you to execute the openstack-upgrade action for this charm on wait for you to execute the openstack-upgrade action for this charm on
each unit. If False it will revert to existing behavior of upgrading each unit. If False it will revert to existing behavior of upgrading
all units on config change. all units on config change.
haproxy-server-timeout:
type: int
default:
description: |
Server timeout configuration in ms for haproxy, used in HA
configurations. If not provided, default value of 30000ms is used.
haproxy-client-timeout:
type: int
default:
description: |
Client timeout configuration in ms for haproxy, used in HA
configurations. If not provided, default value of 30000ms is used.
haproxy-queue-timeout:
type: int
default:
description: |
Queue timeout configuration in ms for haproxy, used in HA
configurations. If not provided, default value of 5000ms is used.
haproxy-connect-timeout:
type: int
default:
description: |
Connect timeout configuration in ms for haproxy, used in HA
configurations. If not provided, default value of 5000ms is used.