context used in RPC method is not compatible with RPC common code

Bug #1077012 reported by yong sheng gong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
yong sheng gong

Bug Description

openstack common log.py needs user_id, project_id in context.

the default option vlaue is: cfg.StrOpt('logging_context_format_string',
               default='%(asctime)s %(levelname)s %(name)s [%(request_id)s '
                       '%(user_id)s %(project_id)s] %(instance)s'
                       '%(message)s',

also we need to clean up context usage in RPC calling and message dispatching.
1. call RPC use quantum context
2. the context argument of the message processing function should be a quantum context

Changed in quantum:
assignee: nobody → yong sheng gong (gongysh)
importance: Undecided → Medium
milestone: none → grizzly-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in quantum:
status: New → In Progress
Revision history for this message
Mark McClain (markmcclain) wrote :

Why not just change the value in the configuration files of logging_context_format_string? To include tenant_id instead of project _id. I am not sure this an actual bug.

Revision history for this message
dan wendlandt (danwent) wrote :

feel free to merge this in G-1 and update, but we won't block G-1 for it.

Changed in quantum:
milestone: grizzly-1 → grizzly-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/15726
Committed: http://github.com/openstack/quantum/commit/05383d1340aecd7192609a9197c249886d844a46
Submitter: Jenkins
Branch: master

commit 05383d1340aecd7192609a9197c249886d844a46
Author: gongysh <email address hidden>
Date: Fri Nov 9 22:45:58 2012 +0800

    Fix context problem

    On plugin side, we use normal API context if any to call RPC methods.
    We use our plugin dispatcher to convert RPC context into quantum admin
    context. After that the callback's functions have the first argument context
    as normal quantum context.

    On agent side, we use admin context without session property as its
    RPC calling context. Call back context is default RPCCommonContext in
    Openstack common modules.

    This patch also fixes the problem in the following bug:

    Bug #1077012

    Change-Id: I913b48dcd84d275cd7de30ca990be00c243e63ea

Changed in quantum:
status: In Progress → Fix Committed
Revision history for this message
dan wendlandt (danwent) wrote :

this bug actually slipped in right before the G-1 deadline, so updating milestone info.

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