KeyError when logging

Bug #1098278 reported by Rick Harris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Rick Harris

Bug Description

This is related to this bug from oslo/ceilometer: https://bugs.launchpad.net/ceilometer/+bug/1078190

The problem is that Nova's RequestContext uses project_id/user_id whereas Oslo uses tenant/user. In order to use context-aware code from Oslo, we need a shim so that the two versions of the RequestObject behave the same.

Long term, we should reconcile the differences between the two and settle on one common form of RequestContext.

Changed in nova:
assignee: nobody → Rick Harris (rconradharris)
importance: Undecided → High
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
Chris Behrens (cbehrens) wrote :

Yeah, this bug is causing tracebacks on logging with the default config values that try to expand %(user)s and %(tenant) from the context.

Changed in nova:
milestone: none → grizzly-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/19412

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

Reviewed: https://review.openstack.org/19410
Committed: http://github.com/openstack/nova/commit/ce098ccce9d67df8c243fa885640989a4703ac53
Submitter: Jenkins
Branch: master

commit ce098ccce9d67df8c243fa885640989a4703ac53
Author: Rick Harris <email address hidden>
Date: Thu Jan 10 18:22:00 2013 +0000

    Add user/tenant shim to RequestContext

    This is necessary because we pass the Nova context object to
    openstack-common/code (logging, for example), which expects the
    attributes to be named user/tenant not user_id/project_id.

    Fixes bug 1098278

    Change-Id: Ic0dc49ef54515fc0ffaa0895cf4d88701afb1e16

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/19412
Committed: http://github.com/openstack/nova/commit/86db5354bce8b530dde74abce2e96afbf18a17fc
Submitter: Jenkins
Branch: milestone-proposed

commit 86db5354bce8b530dde74abce2e96afbf18a17fc
Author: Rick Harris <email address hidden>
Date: Thu Jan 10 18:22:00 2013 +0000

    Add user/tenant shim to RequestContext

    This is necessary because we pass the Nova context object to
    openstack-common/code (logging, for example), which expects the
    attributes to be named user/tenant not user_id/project_id.

    Fixes bug 1098278

    Change-Id: Ic0dc49ef54515fc0ffaa0895cf4d88701afb1e16
    (cherry picked from commit ce098ccce9d67df8c243fa885640989a4703ac53)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
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.