]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Raise max header size to accommodate large tokens
authorzhhuabj <zhhuabj@cn.ibm.com>
Fri, 17 Jan 2014 10:21:01 +0000 (18:21 +0800)
committerMark McClain <mmcclain@yahoo-inc.com>
Sun, 23 Feb 2014 05:18:20 +0000 (00:18 -0500)
The max header is exceeded in the following scenario
- Auth tokens built with a keystone v3 API catalog
- A catalog with approximately 8 or more endpoints defined

Change-Id: Ie815e457c0b25ab828e780b5d90233ba0ceff61f
Closes-Bug: #1251026

etc/neutron.conf
neutron/wsgi.py

index 1e2226fc3e2c7891b915a6b774059713b6b13561..091a71ce067630fc074396921c87d5c30faa8e28 100644 (file)
@@ -266,6 +266,9 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
 # Number of backlog requests to configure the socket with.
 # backlog = 4096
 
+# Max header line to accommodate large tokens
+# max_header_line = 16384
+
 # Enable SSL on the API server
 # use_ssl = False
 
index 9d9ff7b90ef823b29403c3fdbdef848602c27182..c667f71b1e9255aa955a2b5b15dced2952f7174e 100644 (file)
@@ -58,6 +58,9 @@ socket_opts = [
     cfg.IntOpt('retry_until_window',
                default=30,
                help=_("Number of seconds to keep retrying to listen")),
+    cfg.IntOpt('max_header_line',
+               default=16384,
+               help=_("Max header line to accommodate large tokens")),
     cfg.BoolOpt('use_ssl',
                 default=False,
                 help=_('Enable SSL on the API server')),
@@ -116,6 +119,8 @@ class Server(object):
     """Server class to manage multiple WSGI sockets and applications."""
 
     def __init__(self, name, threads=1000):
+        # Raise the default from 8192 to accommodate large tokens
+        eventlet.wsgi.MAX_HEADER_LINE = CONF.max_header_line
         self.pool = eventlet.GreenPool(threads)
         self.name = name
         self._launcher = None