KeyError: 'user_id' in devstack logs

Bug #1478116 reported by Kaitlin Farr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Medium
Kaitlin Farr

Bug Description

When running devstack with Barbican enabled, the Barbican logs have multiple entries of the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/handlers.py", line 115, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 235, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
KeyError: 'user_id'
Logged from file context.py, line 41

Related to bug 1431784

Proposed fix: update lib/barbican from:
     setup_colorized_logging $BARBICAN_CONF DEFAULT "project_id" "user_id"
to:
    setup_colorized_logging $BARBICAN_CONF DEFAULT project user

See:
https://review.openstack.org/#/c/194656/
https://review.openstack.org/#/c/164430/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/205670
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=f113520694f17ae36390ffecf526b52aa1ceba2e
Submitter: Jenkins
Branch: master

commit f113520694f17ae36390ffecf526b52aa1ceba2e
Author: Kaitlin Farr <email address hidden>
Date: Fri Jul 24 14:41:00 2015 -0400

    Fix colorized logging in Devstack

    When running Barbican with Devstack, the logs would have multiple
    entries of "KeyError: 'user_id'". This resolves that error.

    Change-Id: Ia4da694decb6451ca67bf4159c803410f4be606b
    Closes-Bug: #1478116

Changed in barbican:
status: New → Fix Committed
Changed in barbican:
importance: Undecided → Medium
assignee: nobody → Kaitlin Farr (kaitlin-farr)
Thierry Carrez (ttx)
Changed in barbican:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in barbican:
milestone: liberty-3 → 1.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.