Havan rc2 acl scenarios failing due to timezone assumption
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Low
|
David Peraza | ||
Havana |
Fix Released
|
Low
|
David Peraza |
Bug Description
keystoneclient 0.4 uses utcnow to determine if a token has expired. The acl scenarios FakeMemcache simulates expires by doing datetime.now which uses current timezone this and issue if current timezone is not utc.
Here is a sample of the failure I see
=======
FAIL: tests.api.
tags: worker-13
-------
pythonlogging:'': {{{
connecting to MongoDB on mongodb:
Starting keystone auth_token middleware
Configuring auth_uri to point to the public identity endpoint is required; clients may not be able to authenticate against an admin endpoint
Using /var/cache/
Using fake.cache memcache for caching token
Auth Token proceeding with requested v2.0 apis
Starting new HTTP connection (1): 127.0.0.1
Retrying on HTTP connection exception: HTTPConnectionP
Starting new HTTP connection (1): 127.0.0.1
Retrying on HTTP connection exception: HTTPConnectionP
Starting new HTTP connection (1): 127.0.0.1
Retrying on HTTP connection exception: HTTPConnectionP
Starting new HTTP connection (1): 127.0.0.1
HTTP connection exception: HTTPConnectionP
Authorization failed for token 4562138218392832
Invalid user token - rejecting request
}}}
Traceback (most recent call last):
File "ceilometer/
return func(*args, **kwargs)
File "tests/
"X-Project-Id": "project-good"})
File "tests/
**params)
File "ceilometer/
expect_
File "/home/
expect_
File "/home/
self.
File "/home/
res)
AppError: Bad response: 401 Unauthorized (not 200 OK or 3xx redirect for http://
'Authentication required'
=======
Changed in ceilometer: | |
assignee: | nobody → David Peraza (dperaza) |
status: | New → In Progress |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | icehouse-1 → 2014.1 |
Reviewed: https:/ /review. openstack. org/52182 github. com/openstack/ ceilometer/ commit/ ac2a503d4d9ada6 9b5d5c1fbd2acf7 397d8b4ac9
Committed: http://
Submitter: Jenkins
Branch: master
commit ac2a503d4d9ada6 9b5d5c1fbd2acf7 397d8b4ac9
Author: David Peraza <email address hidden>
Date: Wed Oct 16 13:14:10 2013 -0500
Changes FakeMemcache to set token to expire on utcnow + 5 mins
fixes bug 1240994
keystoneclient 0.4 will use utcnow to compare expiration date.
The FakMemcache class sets expiration to datetime.now which sets
date for local timezone. If this timezone happens to be behind
utc the test will fail with expiration error because we are
comparing utc + 5 mins with utc - 1 or more hours.
Change-Id: I551506a5aaf0ae f77476b11786399 a66225603bf