Merge lp:~raharper/charms/precise/swift-proxy/add-proxy-node-timeout into lp:~openstack-charmers-archive/charms/trusty/swift-proxy/next

Proposed by James Page
Status: Merged
Merged at revision: 53
Proposed branch: lp:~raharper/charms/precise/swift-proxy/add-proxy-node-timeout
Merge into: lp:~openstack-charmers-archive/charms/trusty/swift-proxy/next
Diff against target: 119 lines (+27/-4)
8 files modified
config.yaml (+13/-0)
hooks/swift_context.py (+3/-1)
revision (+1/-1)
templates/essex/proxy-server.conf (+2/-0)
templates/grizzly/proxy-server.conf (+2/-0)
templates/havana/proxy-server.conf (+2/-0)
templates/icehouse/proxy-server.conf (+2/-0)
unit_tests/test_templates.py (+2/-2)
To merge this branch: bzr merge lp:~raharper/charms/precise/swift-proxy/add-proxy-node-timeout
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
James Page Pending
Review via email: mp+223569@code.launchpad.net

This proposal supersedes a proposal from 2014-06-04.

Description of the change

Deploying swift-proxy on physical systems with slowish disks and putting large (>1G) objects would fail with 503 return code. swift-proxy logs included ChunkWrite timeouts. The default timeout to hand off to other services (swift-storage) is 10 seconds. When the swift-storage host was flushing data out to disk; this stalled longer than 10 seconds, failing the operation.

This branch updates swift-proxy to expose new config options:

node-timeout and recoverable-node-timeout. These values are described in upstream:

http://docs.openstack.org/trunk/config-reference/content/proxy-server-conf.html

The default values for the config options were raised to something reasonable that worked for slower disks, 60 seconds and 30 respectively.

Tested on precise-icehouse

To post a comment you must log in.

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 2013-04-15 19:41:45 +0000
3+++ config.yaml 2014-06-18 14:18:42 +0000
4@@ -106,6 +106,19 @@
5 default: true
6 type: boolean
7 description: Delay authentication to downstream WSGI services.
8+ node-timeout:
9+ default: 60
10+ type: int
11+ description: How long the proxy server will wait on responses from the a/c/o servers.
12+ recoverable-node-timeout:
13+ default: 30
14+ type: int
15+ description: |
16+ How long the proxy server will wait for an initial response and to read a
17+ chunk of data from the object servers while serving GET / HEAD requests.
18+ Timeouts from these requests can be recovered from so setting this to
19+ something lower than node-timeout would provide quicker error recovery
20+ while allowing for a longer timeout for non-recoverable requests (PUTs).
21 # Manual Keystone configuration.
22 keystone-auth-host:
23 type: string
24
25=== modified file 'hooks/swift_context.py'
26--- hooks/swift_context.py 2014-04-10 16:52:10 +0000
27+++ hooks/swift_context.py 2014-06-18 14:18:42 +0000
28@@ -139,7 +139,9 @@
29 'bind_port': determine_api_port(bind_port),
30 'workers': workers,
31 'operator_roles': config('operator-roles'),
32- 'delay_auth_decision': config('delay-auth-decision')
33+ 'delay_auth_decision': config('delay-auth-decision'),
34+ 'node_timeout': config('node-timeout'),
35+ 'recoverable_node_timeout': config('recoverable-node-timeout'),
36 }
37
38 ctxt['ssl'] = False
39
40=== modified file 'revision'
41--- revision 2013-09-27 12:02:37 +0000
42+++ revision 2014-06-18 14:18:42 +0000
43@@ -1,1 +1,1 @@
44-146
45+147
46
47=== modified file 'templates/essex/proxy-server.conf'
48--- templates/essex/proxy-server.conf 2014-02-27 12:17:53 +0000
49+++ templates/essex/proxy-server.conf 2014-06-18 14:18:42 +0000
50@@ -19,6 +19,8 @@
51 use = egg:swift#proxy
52 allow_account_management = true
53 {% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
54+node_timeout = {{ node_timeout }}
55+recoverable_node_timeout = {{ recoverable_node_timeout }}
56
57 [filter:tempauth]
58 use = egg:swift#tempauth
59
60=== modified file 'templates/grizzly/proxy-server.conf'
61--- templates/grizzly/proxy-server.conf 2014-03-27 11:23:24 +0000
62+++ templates/grizzly/proxy-server.conf 2014-06-18 14:18:42 +0000
63@@ -19,6 +19,8 @@
64 use = egg:swift#proxy
65 allow_account_management = true
66 {% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
67+node_timeout = {{ node_timeout }}
68+recoverable_node_timeout = {{ recoverable_node_timeout }}
69
70 [filter:tempauth]
71 use = egg:swift#tempauth
72
73=== modified file 'templates/havana/proxy-server.conf'
74--- templates/havana/proxy-server.conf 2014-03-27 11:23:24 +0000
75+++ templates/havana/proxy-server.conf 2014-06-18 14:18:42 +0000
76@@ -19,6 +19,8 @@
77 use = egg:swift#proxy
78 allow_account_management = true
79 {% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
80+node_timeout = {{ node_timeout }}
81+recoverable_node_timeout = {{ recoverable_node_timeout }}
82
83 [filter:tempauth]
84 use = egg:swift#tempauth
85
86=== modified file 'templates/icehouse/proxy-server.conf'
87--- templates/icehouse/proxy-server.conf 2014-04-07 14:44:39 +0000
88+++ templates/icehouse/proxy-server.conf 2014-06-18 14:18:42 +0000
89@@ -19,6 +19,8 @@
90 use = egg:swift#proxy
91 allow_account_management = true
92 {% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
93+node_timeout = {{ node_timeout }}
94+recoverable_node_timeout = {{ recoverable_node_timeout }}
95
96 [filter:tempauth]
97 use = egg:swift#tempauth
98
99=== modified file 'unit_tests/test_templates.py'
100--- unit_tests/test_templates.py 2013-11-18 11:16:28 +0000
101+++ unit_tests/test_templates.py 2014-06-18 14:18:42 +0000
102@@ -46,7 +46,7 @@
103
104 The os_release is no longer provided as context to the templates.
105 """
106- for release in ('essex', 'grizzly', 'havana'):
107+ for release in ('essex', 'grizzly', 'havana', 'icehouse'):
108 template = self.get_template_for_release(release)
109 with open(template.filename, 'r') as template_orig:
110 self.assertNotIn(
111@@ -57,7 +57,7 @@
112
113 def test_config_renders_for_all_releases(self):
114 """The configs render without syntax error."""
115- for release in ('essex', 'grizzly', 'havana'):
116+ for release in ('essex', 'grizzly', 'havana', 'icehouse'):
117 template = self.get_template_for_release(release)
118
119 result = template.render()

Subscribers

People subscribed via source and target branches