Traceback in glanceapi and glance registry in devstack

Bug #1431784 reported by Anand Shanmugam
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Anand Shanmugam

Bug Description

when running devstack got the followng traceback whenever do a listing of glance images from cli or horizon.The traceback occurs both in glance-ap and glance-registry.

==> glance image-list

Trace in g-api
+++++++++++++++++++++
Logged from file policy.py, line 296
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 69, 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 client.py, line 401
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 69, 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 client.py, line 124
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 69, 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'

Traceback from g-registry
++++++++++++++++++++++++++++++++
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 69, 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 session.py, line 509
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 69, 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 images.py, line 186
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 69, 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'

This can be bug in glance or devstack

description: updated
Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Hi Anand,

Earlier I was getting same error when I have pulled latest glance code. Then I have done fresh installation using devstack and this error is not reproducible.

Changed in glance:
status: New → Invalid
Changed in glance:
status: Invalid → New
Revision history for this message
Kamil Rykowski (kamil-rykowski) wrote :

Same issue here, so its definitely a valid bug report.

Revision history for this message
Jordan Pittier (jordan-pittier) wrote :

Same issue here

Changed in glance:
assignee: nobody → Anand Shanmugam (anand1712)
Changed in glance:
assignee: Anand Shanmugam (anand1712) → nobody
Revision history for this message
Anand Shanmugam (anand1712) wrote :

This bug is because of logging context enabled in glance-api.conf and glance-registry.conf.There should not be user_id and project_id.So I think this is specific to devstack.Will move this to devstack

affects: glance → devstack
Changed in devstack:
assignee: nobody → Anand Shanmugam (anand1712)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/164430

Changed in devstack:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/164430
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=1577663f4a7d50542e1c729a3f975af627f6c47b
Submitter: Jenkins
Branch: master

commit 1577663f4a7d50542e1c729a3f975af627f6c47b
Author: Anand Shanmugam <email address hidden>
Date: Sat Mar 14 19:24:10 2015 +0530

    Fix Traceback exceptions in g-api and g-reg

    The log_context format specified in glance-api and glance-reistry
    are causing tracebacks. This fix changes the
    project_id and user_id to tenant and user which are supported
    in oslo-context. This is the format used by other projects

    Change-Id: Ifbf268e9765039a0085c9af930dabf8a5cc681b8
    Closes-Bug: #1431784

Changed in devstack:
status: In Progress → Fix Released
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.