Project name is not available in CinderKeystoneContext

Bug #1178576 reported by harrychillboy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Vincent Hou

Bug Description

NovaKeystoneContext provides project_name as part of request context, however CinderKeystoneContext does not provide it. Its trivial to add but it makes developers to completely replace the original CinderKeystoneContext with a patched or modified class.

Its will be great to have project name available in CinderKeystoneContext as its available through NovaKeystoneContext. To do this just "project_name = req.headers.get('X_TENANT_NAME')" needs to be added to __call__ method.

Revision history for this message
Vincent Hou (houshengbo) wrote :

Harry, is there any other reason why we need to put it in CinderKeystoneContext besides NovaKeystoneContext has it? Anything more about it?

Changed in cinder:
status: New → Incomplete
Revision history for this message
harrychillboy (harrychillboy) wrote :

Vincent, I am openstack developer and implementing a custom solution for my company.

NovaKeystoneContext provides me this tenant_name in the context which made my life easy but in Cinder I have to explicitly make a call to Keystone to fetch tenant_name from tenant_id. This parameter is available in auth response in CinderKeystoneContext however is ignored while making request context. Given the nature of openstack development, I am reluctant to fork my own copy of cinder and add few lines required to read tenant_name. I am forced to implement a workaround by explicitly calling keystone again in my cinder api plugin. I think having some of the core identity information available to all the request contexts will make life easier for everyone and bring a consistency into all the openstack API components.

We are using tenant_name / project_name as a login identity across all other systems. It was not possible for tenant_id since user can not remember or type such long string. So to link openstack components with other third party systems, tenant_name is the only option and having it available across all the request contexts will avoid ugly workarounds.

Vincent Hou (houshengbo)
Changed in cinder:
status: Incomplete → Confirmed
assignee: nobody → Vincent Hou (houshengbo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

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

Reviewed: https://review.openstack.org/33227
Committed: http://github.com/openstack/cinder/commit/742bde97a3db78cfe96975191b3341f4158c3e24
Submitter: Jenkins
Branch: master

commit 742bde97a3db78cfe96975191b3341f4158c3e24
Author: Vincent Hou <email address hidden>
Date: Mon Jun 17 16:42:43 2013 +0800

    Add the project name into CinderKeystoneContext.

    Fixed Bug 1178576.

    Change-Id: I35cbd40c6f4aba45aeb8722ae5e10db8349d4510

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-2 → 2013.2
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.