[openstack-dev] [nova] loss of WSGI request logs with request-id under uwsgi/apache
sean at dague.net
Thu Jul 20 11:18:45 UTC 2017
On 07/19/2017 06:28 PM, Matt Riedemann wrote:
> On 7/19/2017 6:16 AM, Sean Dague wrote:
>> We hit a similar issue with placement, and added custom
>> paste middleware for that. Maybe we need to consider a similar thing
>> here, that would only emit if running under uwsgi/apache?
> For example, this:
Placement can't run under eventlet, so there was no reason to make it
optional (or to not emit if we're under eventlet). I'm fine with it
being mandatory, but for niceness not run when we're under eventlet server.
> If it's not optional for placement, why would we make it optional for
> the compute API? Would turning it on always make it log the request IDs
> twice or something?
That was my concern. Right now the path for logging the INFO request
lines comes from following:
* http server is started via oslo.service
* oslo.service is a wrapper around eventlet.wsgi
* eventlet.wsgi takes a log object in, and uses that for logging
* that log object is our log object, and it uses our .info method to emit
Which means it has the context, which includes things like global
request-id, request-id, project, user, domain, etc.
> Is this a problem for glance/cinder/neutron/keystone and whoever else is
> logging request IDs in the API?
It will be the same issue for anyone else going from oslo.service ->
wsgi. I had forgotten that bit of the problem when we did our cut over,
but it's a pretty big problem, and it actually makes most of the global
request id work somewhat pointless, because we threw away the REST call
tracing entirely if people run under the uwsgi/apache model.
More information about the OpenStack-dev