Bug 971497 - When Keystone AuthToken m/w is used in Swift proxy server it fails to use memcache_servers option
Summary: When Keystone AuthToken m/w is used in Swift proxy server it fails to use mem...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-keystoneclient
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.0
Assignee: Jakub Ruzicka
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks: 1136171
TreeView+ depends on / blocked
 
Reported: 2013-06-06 16:21 UTC by Pavel Sedlák
Modified: 2016-04-27 01:58 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
When using Keystoneclient authtoken middleware with Swift, the option to use memcached directly doesn't work. That is: [filter:authtoken] memcache_servers = 127.0.0.1:11211 won't work. Instead, for token caching within Swift, authtoken middlware must be configured to use Swift's cache: cache=swift.cache
Clone Of:
: 1136171 (view as bug list)
Environment:
Last Closed: 2013-09-25 14:18:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Sedlák 2013-06-06 16:21:45 UTC
When
> [filter:authtoken]
> memcache_servers = 127.0.0.1:11211
is used in /etc/swift/proxy-server.conf
then requests to swift fails with HTTP 500.

Discovered with python-keystoneclient-0.2.3-2.el6ost and also confirmed with RDO version python-keystoneclient-2.3-2.el6.

Can be related to fixes of bug #928558 or #948270.

Steps to Reproduce:
1. enable/ensure usage PKI tokens:
> keystone-manage pki_setup --keystone-user keystone --keystone-group keystone
> set token_format=PKI in keystone.conf
> restart keystone

2. enable direct (not swift.cache) usage of memcached for Keystone authtoken in swift/proxy-server.conf:
> [filter:authtoken]
> memcache_servers = 127.0.0.1:11211

> restart swift-proxy

3. issue request to swift
> swift --debug list
output contains
> DEBUG:swiftclient:RESP STATUS: 500
> 
> DEBUG:swiftclient:RESP BODY: Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 382, in handle_one_response
>     result = self.application(self.environ, start_response)
>   File "/usr/lib/python2.6/site-packages/swift/common/middleware/healthcheck.py", line 57, in __call__
>     return self.app(env, start_response)
>   File "/usr/lib/python2.6/site-packages/swift/common/middleware/memcache.py", line 65, in __call__
>     return self.app(env, start_response)
>   File "/usr/lib/python2.6/site-packages/keystoneclient/middleware/auth_token.py", line 441, in __call__
>     self._init_cache(env)
>   File "/usr/lib/python2.6/site-packages/keystoneclient/middleware/auth_token.py", line 365, in _init_cache
>     self._cache = memorycache.get_client(memcache_servers)
>   File "/usr/lib/python2.6/site-packages/keystoneclient/openstack/common/memorycache.py", line 47, in get_client
>     return client_cls(memcached_servers, debug=0)
>   File "/usr/lib/python2.6/site-packages/memcache.py", line 153, in __init__
>     self.set_servers(servers)
>   File "/usr/lib/python2.6/site-packages/memcache.py", line 174, in set_servers
>     self.servers = [_Host(s, self.debuglog) for s in servers]
>   File "/usr/lib/python2.6/site-packages/memcache.py", line 813, in __init__
>     raise ValueError('Unable to parse connection string: "%s"' % host)
> ValueError: Unable to parse connection string: "1"

Comment 2 Alan Pevec 2013-06-07 17:28:05 UTC
Direct memcached probably doesn't make sense within Swift, so I'd say we should not support it.
Proper upstream solution could be authtoken m/w to detect Swift and use its memcached if available.

Comment 5 Jakub Ruzicka 2013-09-25 14:18:15 UTC
Please fill an upstream Wishlist bug if you consider this feature important.


Note You need to log in before you can comment on or make changes to this bug.