jenkins broken: test_keystone_middleware.* failed

Bug #1309092 reported by ZhiQiang Fan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Eoghan Glynn
Havana
Fix Released
High
Eoghan Glynn
Icehouse
Fix Released
High
Eoghan Glynn

Bug Description

test_keystone_middleware_parse_conffile
 fail
test_keystone_middleware_conf
 fail
test_keystone_middleware_parse_conffile
 fail
test_keystone_middleware_conf

sample full log
http://logs.openstack.org/21/88221/1/check/gate-ceilometer-python27/4bce152/
http://logs.openstack.org/10/87110/1/check/gate-ceilometer-python27/89cc34f/
http://logs.openstack.org/69/87869/3/check/gate-ceilometer-python27/fbde553/

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

local pip freeze
python-keystoneclient==0.7.1
while jenkins
python-keystoneclient==0.8.0

Thomas Herve (therve)
Changed in ceilometer:
assignee: nobody → Thomas Herve (therve)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to ceilometer (master)

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

Changed in ceilometer:
status: New → In Progress
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

https://github.com/openstack/python-keystoneclient/blob/0.8.0/keystoneclient/middleware/auth_token.py#L455

self.auth_uri = urllib.parse.urljoin(self.identity_uri, '/')

self.LOG.warning(urllib.parse.urljoin('foo://x', '/')) shows: '/'
self.LOG.warning(urllib.parse.urljoin('http://x', '/')) shows: 'http://x/'

it seems six.move.urllib.parse.urljoin only accepts valid schema for now

so the test in api.v{1,2}.test_app override auth_protocol to barttp in conf file will no longer act like expect

Changed in ceilometer:
assignee: Thomas Herve (therve) → ZhiQiang Fan (aji-zqfan)
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

and in keystoneclient==0.7.1

https://github.com/openstack/python-keystoneclient/blob/0.7.1/keystoneclient/middleware/auth_token.py#L419

    self.request_uri = '%s://%s:%s' % (auth_protocol, auth_host, auth_port)
    ...
    self.auth_uri = self.request_uri

there is no check for schema

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

read this discussion http://bugs.python.org/issue18828

From urllib.parse:

    uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
                     'wais', 'file', 'https', 'shttp', 'mms',
                     'prospero', 'rtsp', 'rtspu', '', 'sftp',
                     'svn', 'svn+ssh']

too append the barttp as an valid schema, we should append it to parse.uses_relative, since keystone is out of the scope and it is no reason to hack source code for test code which just add an uncommon schema, I think we should modify our test code

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

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

Eoghan Glynn (eglynn)
tags: added: icehouse-backport-potential
tags: added: havana-backport-potential
Eoghan Glynn (eglynn)
Changed in ceilometer:
importance: Undecided → High
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/88374
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0
Submitter: Jenkins
Branch: master

commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0
Author: Thomas Herve <email address hidden>
Date: Thu Apr 17 19:45:19 2014 +0200

    Use known protocol scheme in keystone tests

    With the recent introduction of the identity_uri in keystoneclient,
    there is a small backward incompatible change which means that weird
    protocols like the ones we use during tests aren't support properly
    anymore. The patch replaces "foottp" and "barttp" by "file" hopefully
    keeping testing coverage the same.

    Change-Id: Idb30ff3ee0ca50911e453899ad32e630f9b18724
    Closes-Bug: #1309092

Changed in ceilometer:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to ceilometer (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/88577

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ceilometer (stable/icehouse)

Reviewed: https://review.openstack.org/88577
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=a1ec218d683e27434a5b085f1fbc7e3c13b60684
Submitter: Jenkins
Branch: stable/icehouse

commit a1ec218d683e27434a5b085f1fbc7e3c13b60684
Author: Thomas Herve <email address hidden>
Date: Thu Apr 17 19:45:19 2014 +0200

    Use known protocol scheme in keystone tests

    With the recent introduction of the identity_uri in keystoneclient,
    there is a small backward incompatible change which means that weird
    protocols like the ones we use during tests aren't support properly
    anymore. The patch replaces "foottp" and "barttp" by "file" hopefully
    keeping testing coverage the same.

    Change-Id: Idb30ff3ee0ca50911e453899ad32e630f9b18724
    Closes-Bug: #1309092
    (cherry picked from commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0)

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

Hi, Eoghan Glynn

can you backport to **havana** as soon as possible? I have patches blocked by this bug

thanks

Changed in ceilometer:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to ceilometer (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/88780

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ceilometer (stable/havana)

Reviewed: https://review.openstack.org/88780
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=5fc3f27b06b69b630c5e39d67c71a7a13aca2e79
Submitter: Jenkins
Branch: stable/havana

commit 5fc3f27b06b69b630c5e39d67c71a7a13aca2e79
Author: Eoghan Glynn <email address hidden>
Date: Sat Apr 19 10:11:20 2014 +0100

    Use known protocol scheme in keystone tests

    With the recent introduction of the identity_uri in keystoneclient,
    there is a small backward incompatible change which means that weird
    protocols like the ones we use during tests aren't support properly
    anymore. The patch replaces "foottp" and "barttp" by "file" hopefully
    keeping testing coverage the same.

    Change-Id: Idb30ff3ee0ca50911e453899ad32e630f9b18724
    Closes-Bug: #1309092
    (cherry picked from commit e5b7606eaa94033256eb1aca5f6a6eed4f9e54a0)
    (cherry picked from commit a1ec218d683e27434a5b085f1fbc7e3c13b60684)

Eoghan Glynn (eglynn)
Changed in ceilometer:
assignee: nobody → Eoghan Glynn (eglynn)
milestone: none → juno-1
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-1 → 2014.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.