diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py index 2190e6bd..43529d5c 100644 --- a/hooks/charmhelpers/contrib/openstack/context.py +++ b/hooks/charmhelpers/contrib/openstack/context.py @@ -428,9 +428,9 @@ class HAProxyContext(OSContextGenerator): } if config('haproxy-server-timeout'): - ctxt['haproxy-server-timeout'] = config('haproxy-server-timeout') + ctxt['haproxy_server_timeout'] = config('haproxy-server-timeout') if config('haproxy-client-timeout'): - ctxt['haproxy-client-timeout'] = config('haproxy-client-timeout') + ctxt['haproxy_client_timeout'] = config('haproxy-client-timeout') if config('prefer-ipv6'): ctxt['local_host'] = 'ip6-localhost' diff --git a/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg b/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg index 888ee060..54c2d976 100644 --- a/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg +++ b/hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg @@ -14,14 +14,14 @@ defaults retries 3 timeout queue 1000 timeout connect 1000 -{% if haproxy-client-timeout -%} - timeout client {{ haproxy-client-timeout }} +{% if haproxy_client_timeout -%} + timeout client {{ haproxy_client_timeout }} {% else -%} timeout client 30000 {% endif -%} -{% if haproxy-server-timeout -%} - timeout server {{ haproxy-server-timeout }} +{% if haproxy_server_timeout -%} + timeout server {{ haproxy_server_timeout }} {% else -%} timeout server 30000 {% endif -%}