project_id and user_id should be retrieved from context

Bug #1487992 reported by yuanying
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Peiyu Lin

Bug Description

currently project_id and user_id are retrieved from auth_token_info.
but these parameters can be retrieved v3 keystone api only.
because auth_token_info is different between v2 and v3.

If you specify keystone version to v2 in config file, magnum will not work.

for example:

    [keystone_authtoken]
    auth_uri=http://192.168.11.197:5000/v2.0
    auth_version = v2

this doesn't work.

Peiyu Lin (mathspanda)
Changed in magnum:
assignee: nobody → Peiyu Lin (mathspanda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by LinPeiyu (<email address hidden>) on branch: master
Review: https://review.openstack.org/216580
Reason: Duplicated. see https://review.openstack.org/#/c/216132/

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

Reviewed: https://review.openstack.org/216132
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=eff6864da95ddf38c6b64b8b69568a91907a9c27
Submitter: Jenkins
Branch: master

commit eff6864da95ddf38c6b64b8b69568a91907a9c27
Author: OTSUKA, Yuanying <email address hidden>
Date: Mon Aug 24 16:36:33 2015 +0900

    Set project_id and user_id from context directly

    Currently project_id and user_id are retrieved from auth_token_info,
    but these parameters can be retrieved from v3 keystone api only.
    Because auth_token_info is different between v2 and v3. If keystone
    version v2 is specified in the config file, magnum will not work.

    This patch uses "context.project_id" instead of
    auth_token_info['token']['project']['id'].
    Because auth_token_info['token'] is set by only keystone v3.

    Change-Id: I6982f38934c0778d9a0c4271dbe08f0758b671ad
    Closes-Bug: #1487992

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → 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.