Project name is not available in CinderKeystoneContext

Bug #1178576 reported by harrychillboy on 2013-05-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
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.

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
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) on 2013-06-13
Changed in cinder:
status: Incomplete → Confirmed
assignee: nobody → Vincent Hou (houshengbo)

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

Changed in cinder:
status: Confirmed → In Progress

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) on 2013-07-17
Changed in cinder:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers