Merge lp:~thedac/charms/trusty/glance/lp1522130 into lp:~openstack-charmers-archive/charms/trusty/glance/next

Proposed by David Ames on 2015-12-03
Status: Merged
Merged at revision: 154
Proposed branch: lp:~thedac/charms/trusty/glance/lp1522130
Merge into: lp:~openstack-charmers-archive/charms/trusty/glance/next
Diff against target: 79 lines (+34/-9)
3 files modified
charmhelpers/contrib/openstack/context.py (+6/-0)
charmhelpers/contrib/openstack/templates/haproxy.cfg (+16/-9)
config.yaml (+12/-0)
To merge this branch: bzr merge lp:~thedac/charms/trusty/glance/lp1522130
Reviewer Review Type Date Requested Status
OpenStack Charmers 2015-12-03 Pending
Review via email: mp+279529@code.launchpad.net

Description of the change

Fix bug #1522130

Add sane defaults for timeout connect and queue and make them configurable.

To post a comment you must log in.

charm_unit_test #13816 glance-next for thedac mp279529
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/13816/

charm_lint_check #14820 glance-next for thedac mp279529
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/14820/

charm_amulet_test #8137 glance-next for thedac mp279529
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/13659645/
Build: http://10.245.162.77:8080/job/charm_amulet_test/8137/

155. By David Ames on 2015-12-07

Add haproxy context for new timeout values. Fix template whitespace

charm_lint_check #15046 glance-next for thedac mp279529
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/15046/

charm_unit_test #14037 glance-next for thedac mp279529
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/14037/

charm_amulet_test #8208 glance-next for thedac mp279529
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/8208/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/openstack/context.py'
2--- charmhelpers/contrib/openstack/context.py 2015-09-30 15:01:18 +0000
3+++ charmhelpers/contrib/openstack/context.py 2015-12-07 23:12:38 +0000
4@@ -626,6 +626,12 @@
5 if config('haproxy-client-timeout'):
6 ctxt['haproxy_client_timeout'] = config('haproxy-client-timeout')
7
8+ if config('haproxy-queue-timeout'):
9+ ctxt['haproxy_queue_timeout'] = config('haproxy-queue-timeout')
10+
11+ if config('haproxy-connect-timeout'):
12+ ctxt['haproxy_connect_timeout'] = config('haproxy-connect-timeout')
13+
14 if config('prefer-ipv6'):
15 ctxt['ipv6'] = True
16 ctxt['local_host'] = 'ip6-localhost'
17
18=== modified file 'charmhelpers/contrib/openstack/templates/haproxy.cfg'
19--- charmhelpers/contrib/openstack/templates/haproxy.cfg 2015-01-13 14:38:31 +0000
20+++ charmhelpers/contrib/openstack/templates/haproxy.cfg 2015-12-07 23:12:38 +0000
21@@ -12,19 +12,26 @@
22 option tcplog
23 option dontlognull
24 retries 3
25- timeout queue 1000
26- timeout connect 1000
27-{% if haproxy_client_timeout -%}
28+{%- if haproxy_queue_timeout %}
29+ timeout queue {{ haproxy_queue_timeout }}
30+{%- else %}
31+ timeout queue 5000
32+{%- endif %}
33+{%- if haproxy_connect_timeout %}
34+ timeout connect {{ haproxy_connect_timeout }}
35+{%- else %}
36+ timeout connect 5000
37+{%- endif %}
38+{%- if haproxy_client_timeout %}
39 timeout client {{ haproxy_client_timeout }}
40-{% else -%}
41+{%- else %}
42 timeout client 30000
43-{% endif -%}
44-
45-{% if haproxy_server_timeout -%}
46+{%- endif %}
47+{%- if haproxy_server_timeout %}
48 timeout server {{ haproxy_server_timeout }}
49-{% else -%}
50+{%- else %}
51 timeout server 30000
52-{% endif -%}
53+{%- endif %}
54
55 listen stats {{ stat_port }}
56 mode http
57
58=== modified file 'config.yaml'
59--- config.yaml 2015-08-14 17:19:15 +0000
60+++ config.yaml 2015-12-07 23:12:38 +0000
61@@ -134,6 +134,18 @@
62 description: |
63 Client timeout configuration in ms for haproxy, used in HA
64 configurations. If not provided, default value of 30000ms is used.
65+ haproxy-queue-timeout:
66+ type: int
67+ default:
68+ description: |
69+ Queue timeout configuration in ms for haproxy, used in HA
70+ configurations. If not provided, default value of 5000ms is used.
71+ haproxy-connect-timeout:
72+ type: int
73+ default:
74+ description: |
75+ Connect timeout configuration in ms for haproxy, used in HA
76+ configurations. If not provided, default value of 5000ms is used.
77 ssl_cert:
78 type: string
79 default:

Subscribers

People subscribed via source and target branches