diff options
author | Sean Dague <sean@dague.net> | 2017-07-20 08:48:48 -0400 |
---|---|---|
committer | Matt Riedemann <mriedem.os@gmail.com> | 2017-07-24 14:23:38 -0400 |
commit | aa45a6f3ab7ae870f99365b14b276cceff51ec8d (patch) | |
tree | 73924b04f66af8fd71def62c837de9bfa609d624 /etc | |
parent | 2e4417d57cb6f74664c5746b43db9a96797f33e9 (diff) | |
download | nova-aa45a6f3ab7ae870f99365b14b276cceff51ec8d.tar.gz |
request_log addition for running under uwsgi
If someone chooses to run under uwsgi/apache instead of eventlet, the
basic logging of requests goes away (as that was an eventlet.wsgi
function). This is a critical piece of information for understanding
how services are working, and we need to retain it under uwsgi/apache.
This creates a new request_log middleware, inspired by the one in
placement, to provide that functionality. This includes all the same
information as before: http method, uri, status, content length, time
for the request. It also includes the microversion the request was
processed as, "-" if no microversion.
The middleware does not emit anything if it detects that it's running
under eventlet, to prevent duplicate log messages.
Release notes provided as this will be a manual transition for folks
as it's an api-paste.ini change.
Change-Id: I3a597b06d3501c765e2d7805c6c1375d6f4e40db
Diffstat (limited to 'etc')
-rw-r--r-- | etc/nova/api-paste.ini | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/nova/api-paste.ini b/etc/nova/api-paste.ini index f180ab3151..a056393800 100644 --- a/etc/nova/api-paste.ini +++ b/etc/nova/api-paste.ini @@ -28,17 +28,20 @@ use = call:nova.api.openstack.urlmap:urlmap_factory [composite:openstack_compute_api_v21] use = call:nova.api.auth:pipeline_factory_v21 -noauth2 = cors http_proxy_to_wsgi compute_req_id faultwrap sizelimit osprofiler noauth2 osapi_compute_app_v21 -keystone = cors http_proxy_to_wsgi compute_req_id faultwrap sizelimit osprofiler authtoken keystonecontext osapi_compute_app_v21 +noauth2 = cors http_proxy_to_wsgi compute_req_id faultwrap request_log sizelimit osprofiler noauth2 osapi_compute_app_v21 +keystone = cors http_proxy_to_wsgi compute_req_id faultwrap request_log sizelimit osprofiler authtoken keystonecontext osapi_compute_app_v21 [composite:openstack_compute_api_v21_legacy_v2_compatible] use = call:nova.api.auth:pipeline_factory_v21 -noauth2 = cors http_proxy_to_wsgi compute_req_id faultwrap sizelimit osprofiler noauth2 legacy_v2_compatible osapi_compute_app_v21 -keystone = cors http_proxy_to_wsgi compute_req_id faultwrap sizelimit osprofiler authtoken keystonecontext legacy_v2_compatible osapi_compute_app_v21 +noauth2 = cors http_proxy_to_wsgi compute_req_id faultwrap request_log sizelimit osprofiler noauth2 legacy_v2_compatible osapi_compute_app_v21 +keystone = cors http_proxy_to_wsgi compute_req_id faultwrap request_log sizelimit osprofiler authtoken keystonecontext legacy_v2_compatible osapi_compute_app_v21 [filter:request_id] paste.filter_factory = oslo_middleware:RequestId.factory +[filter:request_log] +paste.filter_factory = nova.api.openstack.requestlog:RequestLog.factory + [filter:compute_req_id] paste.filter_factory = nova.api.compute_req_id:ComputeReqIdMiddleware.factory @@ -64,7 +67,7 @@ paste.filter_factory = nova.api.openstack:LegacyV2CompatibleWrapper.factory paste.app_factory = nova.api.openstack.compute:APIRouterV21.factory [pipeline:oscomputeversions] -pipeline = cors faultwrap http_proxy_to_wsgi oscomputeversionapp +pipeline = cors faultwrap request_log http_proxy_to_wsgi oscomputeversionapp [app:oscomputeversionapp] paste.app_factory = nova.api.openstack.compute.versions:Versions.factory |