Add config options for proxy-server.conf template. node-timeout and recoverable-node-timeout. For large swift/glance uploads, higher defaults are needed to prevent uploads from failing on real servers which are slower than VMs.

This commit is contained in:
Ryan Harper 2014-06-03 20:38:25 -05:00
parent 6c9368fa09
commit bd70af7296
8 changed files with 27 additions and 4 deletions

View File

@ -106,6 +106,19 @@ options:
default: true
type: boolean
description: Delay authentication to downstream WSGI services.
node-timeout:
default: 60
type: int
description: How long the proxy server will wait on responses from the a/c/o servers.
recoverable-node-timeout:
default: 30
type: int
description: |
How long the proxy server will wait for an initial response and to read a
chunk of data from the object servers while serving GET / HEAD requests.
Timeouts from these requests can be recovered from so setting this to
something lower than node-timeout would provide quicker error recovery
while allowing for a longer timeout for non-recoverable requests (PUTs).
# Manual Keystone configuration.
keystone-auth-host:
type: string

View File

@ -139,7 +139,9 @@ class SwiftIdentityContext(OSContextGenerator):
'bind_port': determine_api_port(bind_port),
'workers': workers,
'operator_roles': config('operator-roles'),
'delay_auth_decision': config('delay-auth-decision')
'delay_auth_decision': config('delay-auth-decision'),
'node_timeout': config('node-timeout'),
'recoverable_node_timeout': config('recoverable-node-timeout'),
}
ctxt['ssl'] = False

View File

@ -1 +1 @@
146
147

View File

@ -19,6 +19,8 @@ pipeline = healthcheck cache tempauth proxy-server
use = egg:swift#proxy
allow_account_management = true
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
node_timeout = {{ node_timeout }}
recoverable_node_timeout = {{ recoverable_node_timeout }}
[filter:tempauth]
use = egg:swift#tempauth

View File

@ -19,6 +19,8 @@ pipeline = healthcheck cache tempauth container-quotas account-quotas proxy-serv
use = egg:swift#proxy
allow_account_management = true
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
node_timeout = {{ node_timeout }}
recoverable_node_timeout = {{ recoverable_node_timeout }}
[filter:tempauth]
use = egg:swift#tempauth

View File

@ -19,6 +19,8 @@ pipeline = healthcheck cache tempauth container-quotas account-quotas proxy-serv
use = egg:swift#proxy
allow_account_management = true
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
node_timeout = {{ node_timeout }}
recoverable_node_timeout = {{ recoverable_node_timeout }}
[filter:tempauth]
use = egg:swift#tempauth

View File

@ -19,6 +19,8 @@ pipeline = gatekeeper healthcheck cache container_sync bulk tempurl slo dlo form
use = egg:swift#proxy
allow_account_management = true
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
node_timeout = {{ node_timeout }}
recoverable_node_timeout = {{ recoverable_node_timeout }}
[filter:tempauth]
use = egg:swift#tempauth

View File

@ -46,7 +46,7 @@ class ProxyServerTemplateTestCase(unittest.TestCase):
The os_release is no longer provided as context to the templates.
"""
for release in ('essex', 'grizzly', 'havana'):
for release in ('essex', 'grizzly', 'havana', 'icehouse'):
template = self.get_template_for_release(release)
with open(template.filename, 'r') as template_orig:
self.assertNotIn(
@ -57,7 +57,7 @@ class ProxyServerTemplateTestCase(unittest.TestCase):
def test_config_renders_for_all_releases(self):
"""The configs render without syntax error."""
for release in ('essex', 'grizzly', 'havana'):
for release in ('essex', 'grizzly', 'havana', 'icehouse'):
template = self.get_template_for_release(release)
result = template.render()