← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1527420] Re: Neutron does not log UserID or TenantID

 

This hasn't merged yet.

** Changed in: neutron
       Status: Fix Committed => Fix Released

** Changed in: neutron
       Status: Fix Released => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1527420

Title:
  Neutron does not log UserID or TenantID

Status in neutron:
  In Progress

Bug description:
  Neutron shows the same issues as this devstack bug:
  https://bugs.launchpad.net/devstack/+bug/1399788

  We are using user_identity, which is showing 'none' in the logs.

  from log.py/options.py:

  log_opts = [
      cfg.StrOpt('logging_context_format_string',
                 default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s '
                         '%(name)s [%(request_id)s %(user_identity)s] '
                         '%(instance)s%(message)s',

  Log Snippets:

   | success | rc=0 >>
  2015-12-15 13:26:48.298 43398 INFO neutron.wsgi [req-f408d470-2b16-49e4-8f93-3b4c3ef284e7 None] 172.29.236.10 - - [15/Dec/2015 13:26:48] "DELETE /v2.0/routers/27354e70-87d7-4266-a5f6-0f09827f6b42.json HTTP/1.1" 204 149 0.198291

   | success | rc=0 >>
  2015-12-15 13:26:50.278 43009 INFO neutron.wsgi [req-a07e31a6-b85f-4a83-baf2-c3c18c259877 None] 172.29.236.10 - - [15/Dec/2015 13:26:50] "DELETE /v2.0/routers/698f8934-a85d-455c-aa4f-eec7fde36dd7.json HTTP/1.1" 204 149 0.115795

  I propose changing the default to the fix used in devstack:

  log_opts = [
      cfg.StrOpt('logging_context_format_string',
                 default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s '
                         '%(name)s [%(request_id)s %(user_name)s %(project_name)s] '
                         '%(instance)s%(message)s',

  This applies to both Juno and Kilo, I have not checked anything
  earlier.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1527420/+subscriptions


References