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

This commit is contained in:
David Ames 2015-12-03 14:42:21 -08:00
parent 09961765e1
commit 087f21b892
2 changed files with 34 additions and 2 deletions

View File

@ -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.

View File

@ -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 -%}