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

Proposed by David Ames
Status: Merged
Merged at revision: 107
Proposed branch: lp:~thedac/charms/trusty/ceilometer/lp1522130
Merge into: lp:~openstack-charmers-archive/charms/trusty/ceilometer/next
Diff against target: 88 lines (+46/-9)
3 files modified
charmhelpers/contrib/openstack/context.py (+6/-0)
charmhelpers/contrib/openstack/templates/haproxy.cfg (+16/-9)
config.yaml (+24/-0)
To merge this branch: bzr merge lp:~thedac/charms/trusty/ceilometer/lp1522130
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+279959@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.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #15104 ceilometer-next for thedac mp279959
    LINT OK: passed

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #14088 ceilometer-next for thedac mp279959
    UNIT OK: passed

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #8225 ceilometer-next for thedac mp279959
    AMULET OK: passed

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

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-10-10 22:37:50 +0000
3+++ charmhelpers/contrib/openstack/context.py 2015-12-08 23:35:20 +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 12:04:23 +0000
20+++ charmhelpers/contrib/openstack/templates/haproxy.cfg 2015-12-08 23:35:20 +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-09-22 15:34:48 +0000
60+++ config.yaml 2015-12-08 23:35:20 +0000
61@@ -161,3 +161,27 @@
62 wait for you to execute the openstack-upgrade action for this charm on
63 each unit. If False it will revert to existing behavior of upgrading
64 all units on config change.
65+ haproxy-server-timeout:
66+ type: int
67+ default:
68+ description: |
69+ Server timeout configuration in ms for haproxy, used in HA
70+ configurations. If not provided, default value of 30000ms is used.
71+ haproxy-client-timeout:
72+ type: int
73+ default:
74+ description: |
75+ Client timeout configuration in ms for haproxy, used in HA
76+ configurations. If not provided, default value of 30000ms is used.
77+ haproxy-queue-timeout:
78+ type: int
79+ default:
80+ description: |
81+ Queue timeout configuration in ms for haproxy, used in HA
82+ configurations. If not provided, default value of 5000ms is used.
83+ haproxy-connect-timeout:
84+ type: int
85+ default:
86+ description: |
87+ Connect timeout configuration in ms for haproxy, used in HA
88+ configurations. If not provided, default value of 5000ms is used.

Subscribers

People subscribed via source and target branches