os-collect-config can't get correct keystone v3 auth_url using keystoneclient discover

Bug #1398254 reported by Yanyan Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-collect-config
Fix Released
High
Yanyan Hu

Bug Description

Similar bug was reported and fixed here:
https://bugs.launchpad.net/os-collect-config/+bug/1341936

Current fix expected the keystone v3 auth_url will be available soon. However so far we still can't get correct v3 auth_url using keystoneclient discover(value 'None' will be returned).

(os_collect_config/keystone.py)
 58 try:
 59 discover = ks_discover.Discover(auth_url=auth_url)
 60 v3_auth_url = discover.url_for('3.0')
 61 if v3_auth_url:
 62 self.auth_url = v3_auth_url
 63 else:
 64 self.auth_url = auth_url
 65 except ks_exc.ClientException:
 66 self.auth_url = auth_url.replace('/v2.0', '/v3')

In this case, v2 auth_url will be directly used as v3 auth_url as shown above, and os-collect-config will always complain that it can't get authorization from keystone because of the following error:

# WARNING os_collect_config.heat [-] Authorization failed: The resource could not be found. (HTTP 404)

So we may want to construct the correct v3 auth_url by replacing the incorrect version number rather than directly copying the v2 auth_url value when value 'None' is returned by keystoneclient discover.

Yanyan Hu (yanyanhu)
description: updated
Changed in os-collect-config:
assignee: nobody → Yanyan Hu (yanyanhu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-collect-config (master)

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

Changed in os-collect-config:
status: New → In Progress
Yanyan Hu (yanyanhu)
description: updated
Changed in os-collect-config:
importance: Undecided → High
Changed in os-collect-config:
assignee: Yanyan Hu (yanyanhu) → Thomas Herve (therve)
Changed in os-collect-config:
assignee: Thomas Herve (therve) → Yanyan Hu (yanyanhu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-collect-config (master)

Reviewed: https://review.openstack.org/138246
Committed: https://git.openstack.org/cgit/openstack/os-collect-config/commit/?id=f6ca7618c41acb8264df298a44a2ee8c2dbd3238
Submitter: Jenkins
Branch: master

commit f6ca7618c41acb8264df298a44a2ee8c2dbd3238
Author: Yanyan Hu <email address hidden>
Date: Tue Dec 2 11:34:30 2014 +0800

    Use non-versioned auth_url for keystone

    keystoneclient discover can't get v3 auth_url using v2 auth_url. It
    accepts an url without version number. This patch fixes this issue.

    Change-Id: I45b4c016bd91afc39d39620920951043bb71df05
    Closes-Bug: #1398254

Changed in os-collect-config:
status: In Progress → Fix Committed
Jay Dobies (jdob)
Changed in os-collect-config:
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.