Merge pull request #129 from rackerlabs/gunicorn_fix

Fix Gunicorn server config
This commit is contained in:
Jason Meridth
2014-05-08 14:43:50 -05:00

View File

@@ -14,21 +14,21 @@ from neutron import service # noqa For api_workers config value
options = [
cfg.StringOpt('access_log',
default='/var/log/neutron/http_access.log',
help='The Access log file to write to.'),
cfg.StringOpt('error_log',
default='/var/log/neutron/http_error.log',
help='The Error log file to write to.'),
cfg.StringOpt('worker_class',
default='eventlet',
help='The type of workers to use.'),
cfg.StrOpt('access_log',
default='/var/log/neutron/http_access.log',
help='The Access log file to write to.'),
cfg.StrOpt('error_log',
default='/var/log/neutron/http_error.log',
help='The Error log file to write to.'),
cfg.StrOpt('worker_class',
default='eventlet',
help='The type of workers to use.'),
cfg.IntOpt('limit_request_line',
default=0,
help='The maximum size of HTTP request line in bytes.'),
cfg.StringOpt('loglevel',
default='debug',
help='The granularity of Error log outputs.'),
cfg.StrOpt('loglevel',
default='debug',
help='The granularity of Error log outputs.'),
]
cfg.CONF.register_opts(options, 'gunicorn')
@@ -46,12 +46,12 @@ class Neutron(base.Application):
self.cfg = gconfig.Config(self.usage, prog=self.prog)
settings = {'bind': '%s:%s' % (cfg.CONF.bind_host, cfg.CONF.bind_port),
'workers': cfg.CONF.api_workers,
'worker_class': cfg.CONF.worker_class,
'worker_class': cfg.CONF.gunicorn.worker_class,
'proc_name': 'neutron-server',
'accesslog': cfg.CONF.access_log,
'errorlog': cfg.CONF.error_log,
'limit_request_line': cfg.CONF.limit_request_line,
'loglevel': cfg.CONF.loglevel,
'accesslog': cfg.CONF.gunicorn.access_log,
'errorlog': cfg.CONF.gunicorn.error_log,
'limit_request_line': cfg.CONF.gunicorn.limit_request_line,
'loglevel': cfg.CONF.gunicorn.loglevel,
'access_log_format': ' '.join(('%(h)s',
'%(l)s',
'%(u)s',