environment:
- os:
Description: Ubuntu 10.04.3 LTS
Release: 10.04
- swift: 1.4.8
- WebOb 1.2.2
if using latest WebOb 1.2.2, when executing "swauth-add-account " after "swauth-prep", will receive "500 Internal Server error", and below exception in /var/log/syslog on proxy node:
Aug 16 18:15:31 localhost proxy-server ERROR Unhandled exception in request: #012Traceback (most recent call last):#012 File "/opt/python_swift/lib/python2.6/site-packages/swift-1.4.8-py2.6.egg/swift/proxy/server.py", line 1888, in handle_request#012 return handler(req)#012 File "/opt/python_swift/lib/python2.6/site-packages/swift-1.4.8-py2.6.egg/swift/proxy/server.py", line 93, in wrapped#012 return func(*a, **kw)#012 File "/opt/python_swift/lib/python2.6/site-packages/swift-1.4.8-py2.6.egg/swift/proxy/server.py", line 109, in wrapped#012 return func(*a, **kw)#012 File "/opt/python_swift/lib/python2.6/site-packages/swift-1.4.8-py2.6.egg/swift/proxy/server.py", line 1501, in HEAD#012 return self.GETorHEAD(req)#012 File "/opt/python_swift/lib/python2.6/site-packages/swift-1.4.8-py2.6.egg/swift/proxy/server.py", line 1465, in GETorHEAD#012 req.path_info, self.app.container_ring.replica_count)#012 File "/opt/python_swift/lib/python2.6/site-packages/swift-1.4.8-py2.6.egg/swift/proxy/server.py", line 840, in GETorHEAD_base#012 source.getheader('x-timestamp')#012TypeError: 'NoneType' object does not support item assignment (txn: txe0395a56709f47c8ac14ab7e55c8913c)
Aug 16 18:15:31 localhost proxy-server STDOUT: EXCEPTION IN handle: Traceback (most recent call last):#012 File "build/bdist.linux-x86_64/egg/swauth/middleware.py", line 404, in handle#012 return self.handle_request(req)(env, start_response)#012 File "build/bdist.linux-x86_64/egg/swauth/middleware.py", line 471, in handle_request#012 req.response = handler(req)#012 File "build/bdist.linux-x86_64/egg/swauth/middleware.py", line 716, in handle_put_account#012 'account: %s %s' % (path, resp.status))#012Exception: Could not verify account within main auth account: /v1/AUTH_.auth/test 500 Internal Server Error#012: {'SCRIPT_NAME': '/auth/v2/test', 'webob.adhoc_attrs': {'start_time': 1345166131.038785, 'bytes_transferred': '-', 'client_disconnect': False}, 'REQUEST_METHOD': 'PUT', 'PATH_INFO': '', 'SERVER_PROTOCOL': 'HTTP/1.0', 'eventlet.posthooks': [(<bound method Swauth.posthooklogger of <swauth.middleware.Swauth object at 0x116f850>>, (<Request at 0x16e1c50 PUT http://192.168.10.3:9090/auth/v2/test>,), {})], 'SERVER_NAME': '192.168.10.3', 'REMOTE_ADDR': '192.168.10.3', 'eventlet.input': <eventlet.wsgi.Input object at 0x117ed50>, 'HTTP_X_AUTH_ADMIN_KEY': '123456', 'wsgi.url_scheme': 'http', 'SERVER_PORT': '9090', 'HTTP_X_AUTH_ADMIN_USER': '.super_admin', 'wsgi.input': <eventlet.wsgi.Input object at 0x117ed50>, 'HTTP_HOST': '192.168.10.3:9090', 'swift.cache': <swift.common.memcached.MemcacheRing object at 0x16e1a10>, 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <swift.common.utils.LoggerFileObject object at 0x115d9d0>, 'wsgi.multiprocess': False, 'swift.trans_id': 'txe0395a56709f47c8ac14ab7e55c8913c', 'CONTENT_TYPE': None, 'HTTP_ACCEPT_ENCODING': 'identity'}
while downgrading WebOb to 1.0.8, swauth-add-account can work well.
Work was done in Swift 1.6.0 towards WebOb 1.2 compatibility. Considering the pain that went into that, I can't imagine it would be backported to Swift 1.4.8 (but that is just my opinion, others may be more masochistic).