diff --git a/config.yaml b/config.yaml index 93f4fdb6..f58b519e 100755 --- a/config.yaml +++ b/config.yaml @@ -457,3 +457,27 @@ options: type: boolean default: False description: Enable port security extension for ML2 plugin (>= kilo). + 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. diff --git a/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg b/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg index ad875f16..4a3e2d7a 100644 --- a/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg +++ b/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg @@ -12,8 +12,16 @@ defaults option tcplog option dontlognull retries 3 - timeout queue 1000 - timeout connect 1000 +{% if haproxy_queue_timeout -%} + 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 -%} timeout client {{ haproxy_client_timeout }} {% else -%}