← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1433687] Re: devstack logs do not contain pid information for log messages with context

 

Reviewed:  https://review.openstack.org/172510
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=198887e8903696ea9fcbec0f8a91c2f6ca5a34c7
Submitter: Jenkins
Branch:    master

commit 198887e8903696ea9fcbec0f8a91c2f6ca5a34c7
Author: Ihar Hrachyshka <ihrachys@xxxxxxxxxx>
Date:   Fri Apr 10 18:45:35 2015 +0200

    logging: don't set logging format strings for keystone
    
    Don't override those format strings since the overridden
    values are identical to those used by oslo.log by default [1].
    
    logging_exception_prefix is still set since it changes the logging
    format to use TRACE label for exceptions instead of default ERROR.
    
    [1]: https://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/_options.py?id=c47a91dbbb586c27d8521b1016bf7901c47b1c90#n110
    
    Closes-Bug: #1433687
    Change-Id: Ibd11cd6b0defb6dc709dbd3e718a49fd71cce6b6


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

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

Title:
  devstack logs do not contain pid information for log messages with
  context

Status in devstack:
  Fix Released
Status in neutron:
  Fix Released

Bug description:
  Compare:

  2015-03-18 15:00:15.990 INFO neutron.wsgi [req-412094f3-6b4e-41e8-9f2b-833ff6b3ee7a SecurityGroupsTestJSON-724004567 SecurityGroupsTestJSON-664869352] 127.0.0.1 - - [18/Mar/2015 15:00:15] "DELETE /v2.0/security-groups/9cc93b9a-2d06-46e6-9160-1521683f13f9.json HTTP/1.1" 204 149 0.060949
  2015-03-18 15:00:16.001 15709 INFO neutron.wsgi [-] (15709) accepted ('127.0.0.1', 60381)

  This is because in devstack, we override the default log format string
  with the one that misses the info. Note that to make it work, it is
  not enough to fall back to default string, since it uses user_identity
  context field that is missing in neutron context object. That is
  because neutron.context.Context does not rely on oslo_context.Context
  when transforming it to_dict().

  The proper fix would be:

  - make neutron context reuse oslo_context.Context.to_dict()
  - make devstack not overwrite the default log format string

  Also note that log colorizer from devstack also rewrites the default
  format string value. In that case, we just need to update the string
  to include pid information.

  Also note that the issue may be more far reaching, since devstack
  rewrites the string for other services too (nova, ironic, among
  others).

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


References