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

Proposed by David Ames
Status: Merged
Merged at revision: 136
Proposed branch: lp:~thedac/charms/trusty/cinder/lp1522130
Merge into: lp:~openstack-charmers-archive/charms/trusty/cinder/next
Diff against target: 88 lines (+46/-9)
3 files modified
config.yaml (+24/-0)
hooks/charmhelpers/contrib/openstack/context.py (+6/-0)
hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg (+16/-9)
To merge this branch: bzr merge lp:~thedac/charms/trusty/cinder/lp1522130
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+279530@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_unit_test #13815 cinder-next for thedac mp279530
    UNIT OK: passed

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

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

charm_lint_check #14819 cinder-next for thedac mp279530
    LINT OK: passed

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

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

charm_amulet_test #8142 cinder-next for thedac mp279530
    AMULET OK: passed

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

137. By David Ames

Add haproxy context for new timeout values. Fix template whitespace

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

charm_lint_check #15047 cinder-next for thedac mp279530
    LINT OK: passed

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

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

charm_unit_test #14034 cinder-next for thedac mp279530
    UNIT OK: passed

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

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

charm_amulet_test #8210 cinder-next for thedac mp279530
    AMULET OK: passed

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

Preview Diff

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

Subscribers

People subscribed via source and target branches