is8601 don't get passed in auth_token

Bug #951603 reported by Chmouel Boudjnah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Chmouel Boudjnah

Bug Description

I am getting this when using auth_token with memcache enabled :

swift Starting the S3 Token Authentication component
swift Started child 911
swift Starting the S3 Token Authentication component
swift Error: global name 'iso8601' is not defined:
Traceback (most recent call last):
  File "/shared/GIT/openstack/swift/swift/common/middleware/catch_errors.py", line 47, in __call__
    return self.app(env, my_start_response)
  File "/shared/GIT/openstack/swift/swift/common/middleware/healthcheck.py", line 38, in __call__
    return self.app(env, start_response)
  File "/shared/GIT/openstack/swift/swift/common/middleware/memcache.py", line 47, in __call__
    return self.app(env, start_response)
  File "/shared/GIT/openstack/swift/swift/common/middleware/swift3.py", line 460, in __call__
    return self.app(env, start_response)
  File "/shared/GIT/openstack/keystone/keystone/middleware/s3_token.py", line 63, in __call__
    return self.app(environ, start_response)
  File "/shared/GIT/openstack/keystone/keystone/middleware/auth_token.py", line 172, in __call__
    token_info = self._validate_user_token(user_token)
  File "/shared/GIT/openstack/keystone/keystone/middleware/auth_token.py", line 345, in _validate_user_token
    self._cache_put(user_token, data)
  File "/shared/GIT/openstack/keystone/keystone/middleware/auth_token.py", line 473, in _cache_put
    expires = iso8601.parse_date(timestamp)
NameError: global name 'iso8601' is not defined (txn: tx6607b461da42426eb057685b0e0dcd16)

iso8601 was properly imported in __init__() but I guess webob/wsgi don't pass the import to other methods (and due need a self. variable or a env variable to pass the import)

Changed in keystone:
assignee: nobody → Chmouel Boudjnah (chmouel)
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/5195

Changed in keystone:
status: New → In Progress
Revision history for this message
Jesse Andrews (anotherjesse) wrote :

this bug shouldn't be considered fixed until tests are added to the middleware tests.

Changed in keystone:
milestone: none → essex-rc1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/5195
Committed: http://github.com/openstack/keystone/commit/1e07b98d77a6ccb254e6f4411682235a47dab137
Submitter: Jenkins
Branch: master

commit 1e07b98d77a6ccb254e6f4411682235a47dab137
Author: Chmouel Boudjnah <email address hidden>
Date: Sat Mar 10 17:22:06 2012 +0100

    Fix iso8601 import/use and date comparaison.

    - Store the unix time from iso8601.parse_date to compare against
      time.time.
    - on a WSGI environement the import don't get passed to the methods from
      __init__ use a self. variable.
    - Fixes bug 951603.
    - Add unit tests.
    - Add iso8601 to test-requires.

    Change-Id: Ia8af8b203d1310d5ae6868c3a14dfdf68d6e5331

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-rc1 → 2012.1
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.