Attempt to call strftime on a str fails revocation_list

Bug #1490743 reported by Timothy Symanczyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Pankaj Mishra

Bug Description

This bug is nearly identical to the old bug https://bugs.launchpad.net/keystone/+bug/1285871 , same symptom and nearly identical code . It is currently causing barbican to fail for us.

2015-08-21 03:17:05.244 22742 ERROR keystone.common.wsgi [-] 'str' object has no a
ttribute 'strftime'
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi Traceback (most recent ca
ll last):
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 239, in __call__
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi result = method(context, **params)
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 158, in inner
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi return f(self, context, *args, **kwargs)
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi File "/usr/lib/python2.7/site-packages/keystone/auth/controllers.py", line 549, in revocation_list
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi t['expires'] = timeutils.isotime(expires)
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_utils/timeutils.py", line 52, in isotime
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi st = at.strftime(_ISO8601_TIME_FORMAT
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi AttributeError: 'str' object has no attribute 'strftime'
2015-08-21 03:17:05.244 22742 TRACE keystone.common.wsgi
2015-08-21 03:17:05.263 22742 INFO eventlet.wsgi.server [-] 100.72.132.128,10.50.249.37 - - [21/Aug/2015 03:17:05] "GET /v3/auth/tokens/OS-PKI/revoked HTTP/1.1" 500 470 0.063453

Changed in keystone:
assignee: nobody → Timothy Symanczyk (timothy-symanczyk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: New → In Progress
Changed in keystone:
importance: Undecided → Medium
Dolph Mathews (dolph)
Changed in keystone:
milestone: none → liberty-rc1
Changed in keystone:
milestone: liberty-rc1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Timothy Symanczyk (<email address hidden>) on branch: master
Review: https://review.openstack.org/219032
Reason: I don't know when I'll have the time to do a proper fix. Don't want to block anyone.

Changed in keystone:
assignee: Timothy Symanczyk (timothy-symanczyk) → nobody
Kent Wang (k.wang)
Changed in keystone:
assignee: nobody → Kent Wang (k.wang)
Revision history for this message
Kent Wang (k.wang) wrote :

Hi can help please on reproducing this bug?

With a GET to /v3/auth/tokens/OS-PKI/revoked I get a success and no 500 error

Revision history for this message
Timothy Symanczyk (timothy-symanczyk) wrote :

Obvious question first, your deployment is using PKI tokens?

Other than that, the only factor we had noticed in production is that if the revocation list is empty (iow. there have been no recently revoked tokens) then this error will NOT occur. But we would very consistently encounter this error any time the revocation list contained any revoked tokens.

We are running the Kilo branch of Keystone.

I will post again if I can think of anything else that may help.

Revision history for this message
Kent Wang (k.wang) wrote :

Hi strangely I'm getting one PKI token back from /v3/auth/tokens/OS-PKI/revoked, even after revoking many more. No errors yet. Will try some more

Revision history for this message
Kent Wang (k.wang) wrote :

I just learn that /v3/auth/tokens/OS-PKI/revoked is deprecated. Looks like replaced with OS-REVOKE: http://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3-os-revoke-ext.html

I will try to reproduce it on older api

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

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

Revision history for this message
Steve Martinelli (stevemar) wrote :

unassigning due to inactivity

Changed in keystone:
assignee: Kent Wang (k.wang) → nobody
status: In Progress → Triaged
Revision history for this message
Steve Martinelli (stevemar) wrote :

This is strange, the exception is the exact same as the referenced bug (https://bugs.launchpad.net/keystone/+bug/1285871) which was fixed in icehouse, and the code has not changed since: https://github.com/openstack/keystone/blob/master/keystone/token/controllers.py#L467

Given that k.wang was also able to reproduce this, and PKI tokens are being deprecated, I'm inclined to at least mark this as incomplete. I'd like to get confirmation that this bug is still valid, it's been a few months since it's been reported.

Changed in keystone:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Identity (keystone) because there has been no activity for 60 days.]

Changed in keystone:
status: Incomplete → Expired
Changed in keystone:
assignee: nobody → Pankaj Mishra (pankaj-mishra)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by David Stanek (<email address hidden>) on branch: master
Review: https://review.openstack.org/235487
Reason: No activity. If anyone wants to work on this, fell free to re-open.

zhangw (zhangw)
Changed in keystone:
status: Expired → Fix Committed
Changed in keystone:
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.