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

Proposed by David Ames
Status: Merged
Merged at revision: 53
Proposed branch: lp:~thedac/charms/trusty/ceph-radosgw/lp1522130
Merge into: lp:~openstack-charmers-archive/charms/trusty/ceph-radosgw/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/ceph-radosgw/lp1522130
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+279531@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 #14817 ceph-radosgw-next for thedac mp279531
    LINT OK: passed

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

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

charm_amulet_test #8136 ceph-radosgw-next for thedac mp279531
    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/13659977/
Build: http://10.245.162.77:8080/job/charm_amulet_test/8136/

54. 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 #15043 ceph-radosgw-next for thedac mp279531
    LINT OK: passed

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

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

charm_unit_test #14031 ceph-radosgw-next for thedac mp279531
    UNIT OK: passed

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

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

charm_amulet_test #8211 ceph-radosgw-next for thedac mp279531
    AMULET OK: passed

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

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-11-26 16:20:26 +0000
3+++ config.yaml 2015-12-07 23:09:36 +0000
4@@ -103,3 +103,27 @@
5 the following public endpoint for the ceph-radosgw:
6
7 https://files.example.com:80/swift/v1
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-10-08 13:17:51 +0000
35+++ hooks/charmhelpers/contrib/openstack/context.py 2015-12-07 23:09:36 +0000
36@@ -626,6 +626,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-14 16:48:07 +0000
52+++ hooks/charmhelpers/contrib/openstack/templates/haproxy.cfg 2015-12-07 23:09:36 +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