VNC OpenStack: Cannot list project with keystone V3 with custom endpoints

Bug #1695008 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
High
Édouard Thuleau
R4.0
Fix Committed
High
Édouard Thuleau
Trunk
Fix Committed
High
Édouard Thuleau

Bug Description

Contrail VNC OpenStack code in charge to sync project with keystone cannot determine Keystone API version if auth_url does not defined it (is not mandatory, you could have auth_url set to 'http://host/identity').

Traceback (most recent call last):
  File "<input>", line 1, in <module>
    keystone = kclient.Client(session=sess, auth_url='http://192.168.100.7:5000/v2.0')
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/client.py", line 62, in Client
    d = discover.Discover(session=session, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/discover.py", line 185, in __init__
    authenticated=authenticated)
  File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/_discover.py", line 147, in __init__
    authenticated=authenticated)
  File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/_discover.py", line 41, in get_version_data
    resp = session.get(url, headers=headers, authenticated=authenticated)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 537, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 345, in request
    auth_headers = self.get_auth_headers(auth)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 662, in get_auth_headers
    return auth.get_headers(self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/base.py", line 159, in get_headers
    token = self.get_token(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/base.py", line 208, in get_token
    return self.get_access(session).auth_token
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/base.py", line 254, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/generic/base.py", line 184, in get_auth_ref
    self._plugin = self._do_create_plugin(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/generic/base.py", line 180, in _do_create_plugin
    raise exceptions.DiscoveryFailure(msg)
DiscoveryFailure: Could not determine a suitable URL for the plugin

Tags: config wpc
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/32356
Submitter: ?douard Thuleau (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/32356
Committed: http://github.com/Juniper/contrail-controller/commit/64ea5182d956ab1e21aa9aeb36a69ad24552f95b
Submitter: Zuul (<email address hidden>)
Branch: master

commit 64ea5182d956ab1e21aa9aeb36a69ad24552f95b
Author: Édouard Thuleau <email address hidden>
Date: Thu Jun 1 16:46:41 2017 +0200

[VNC OpenStack] Support Keystone auth URL without API version

If the Keystone API version is not specified in authentication URL,
that patch first tries to authenticate with v3 Password mechanism, if
it fails it tries again with v2.

Change-Id: I032a2429686438976f0b15c27f9201439154ff6a
Closes-Bug: #1695008

Sachin Bansal (sbansal)
no longer affects: opencontrail
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/33725
Submitter: ?douard Thuleau (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/33725
Committed: http://github.com/Juniper/contrail-controller/commit/27cd511e8a570d68c11461782dd670da93f46094
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 27cd511e8a570d68c11461782dd670da93f46094
Author: Édouard Thuleau <email address hidden>
Date: Thu Jun 1 16:46:41 2017 +0200

[VNC OpenStack] Support Keystone auth URL without API version

If the Keystone API version is not specified in authentication URL,
that patch first tries to authenticate with v3 Password mechanism, if
it fails it tries again with v2.

Change-Id: I032a2429686438976f0b15c27f9201439154ff6a
Closes-Bug: #1695008
(cherry picked from commit 64ea5182d956ab1e21aa9aeb36a69ad24552f95b)

Revision history for this message
Jeba Paulaiyan (jebap) wrote : Re: VNC OpenStack: Cannot list project with keystone V3 with custum endpoints

Release-Notes for R3.2.4.0:
===========================
Keystone v3 deployments need to be patched with https://github.com/Juniper/contrail-controller/commit/27cd511e8a570d68c11461782dd670da93f46094 after provisioning.

Jeba Paulaiyan (jebap)
summary: - VNC OpenStack: Cannot list project with keystone V3 with custum
+ VNC OpenStack: Cannot list project with keystone V3 with custom
endpoints
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/35065
Submitter: Ignatious Johnson Christopher (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/35065
Committed: http://github.com/Juniper/contrail-controller/commit/bd46a48276142d841df7391965e93a41aa61c02d
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit bd46a48276142d841df7391965e93a41aa61c02d
Author: Ignatious Johnson Christopher <email address hidden>
Date: Tue Aug 29 16:51:37 2017 -0700

[VNC OpenStack] Support Keystone auth URL without API version

If the Keystone API version is not specified in authentication URL,
that patch first tries to authenticate with v3 Password mechanism, if
it fails it tries again with v2.

Closes-Bug: #1695008

Conflicts:
 src/config/vnc_openstack/vnc_openstack/__init__.py

Change-Id: I671413029b07fb3b0f68c3e7ca1e0a88f7e5d8ef

Vineet Gupta (vineetrf)
tags: added: wpc
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.