diff --git a/sahara/config.py b/sahara/config.py index b1e9580665..f05ec8378f 100644 --- a/sahara/config.py +++ b/sahara/config.py @@ -133,6 +133,7 @@ def list_opts(): from sahara.utils.openstack import nova from sahara.utils.openstack import swift from sahara.utils import proxy + from sahara.utils import wsgi return [ (None, @@ -150,7 +151,8 @@ def list_opts(): periodic.periodic_opts, volumes.opts, proxy.opts, - cpo.event_log_opts)), + cpo.event_log_opts, + wsgi.wsgi_opts)), (api.conductor_group.name, itertools.chain(api.conductor_opts)), (cinder.cinder_group.name, diff --git a/sahara/utils/wsgi.py b/sahara/utils/wsgi.py index 994362d4cc..5cb268d590 100644 --- a/sahara/utils/wsgi.py +++ b/sahara/utils/wsgi.py @@ -42,7 +42,18 @@ from sahara.i18n import _LI from sahara.openstack.common import sslutils LOG = logging.getLogger(__name__) + +wsgi_opts = [ + cfg.IntOpt('max_header_line', + default=16384, + help="Maximum line size of message headers to be accepted. " + "max_header_line may need to be increased when using " + "large tokens (typically those generated by the " + "Keystone v3 API with big service catalogs)."), +] + CONF = cfg.CONF +CONF.register_opts(wsgi_opts) class ProtectedExpatParser(expatreader.ExpatParser): @@ -328,6 +339,7 @@ class Server(object): """Server class to manage multiple WSGI sockets and applications.""" def __init__(self, threads=500): + eventlet.wsgi.MAX_HEADER_LINE = CONF.max_header_line self.threads = threads self.children = [] self.running = True