synced /next
This commit is contained in:
commit
164d08ae2a
24
config.yaml
24
config.yaml
|
@ -103,3 +103,27 @@ options:
|
|||
the following public endpoint for the ceph-radosgw:
|
||||
|
||||
https://files.example.com:80/swift/v1
|
||||
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.
|
||||
|
|
|
@ -626,6 +626,12 @@ class HAProxyContext(OSContextGenerator):
|
|||
if config('haproxy-client-timeout'):
|
||||
ctxt['haproxy_client_timeout'] = config('haproxy-client-timeout')
|
||||
|
||||
if config('haproxy-queue-timeout'):
|
||||
ctxt['haproxy_queue_timeout'] = config('haproxy-queue-timeout')
|
||||
|
||||
if config('haproxy-connect-timeout'):
|
||||
ctxt['haproxy_connect_timeout'] = config('haproxy-connect-timeout')
|
||||
|
||||
if config('prefer-ipv6'):
|
||||
ctxt['ipv6'] = True
|
||||
ctxt['local_host'] = 'ip6-localhost'
|
||||
|
|
|
@ -12,19 +12,26 @@ defaults
|
|||
option tcplog
|
||||
option dontlognull
|
||||
retries 3
|
||||
timeout queue 1000
|
||||
timeout connect 1000
|
||||
{% if haproxy_client_timeout -%}
|
||||
{%- 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 -%}
|
||||
{%- else %}
|
||||
timeout client 30000
|
||||
{% endif -%}
|
||||
|
||||
{% if haproxy_server_timeout -%}
|
||||
{%- endif %}
|
||||
{%- if haproxy_server_timeout %}
|
||||
timeout server {{ haproxy_server_timeout }}
|
||||
{% else -%}
|
||||
{%- else %}
|
||||
timeout server 30000
|
||||
{% endif -%}
|
||||
{%- endif %}
|
||||
|
||||
listen stats {{ stat_port }}
|
||||
mode http
|
||||
|
|
Loading…
Reference in New Issue