** Changed in: keystone
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1346211
Title:
keystone under apache can't handle request chunking
Status in OpenStack Identity (Keystone):
Fix Released
Bug description:
Method to reproduce stack trace for apache config with chunking enabled
========================================================
1. If using devstack, configure it to enable chunking in apache, by
adding "WSGIChunkedRequest On" in the file devstack/files/apache-
keystone.template (in both sections) and start devstack
2. Run from the command line:
openstack -v --debug server list (or any simple command)
3. Look in the output for the very first "curl" command that looks
something like this:
curl -i --insecure -X POST http://192.168.51.21:5000/v2.0/tokens -H
"Content-Type: application/json" -H "Accept: application/json" -H
"User-Agent: python-keystoneclient" -d '{"auth": {"tenantName":
"demo", "passwordCredentials": {"username": "demo", "password":
"admin"}}}'
4. The above "curl" command succeeds. Modify it to use chunking by
adding -H "Transfer-Encoding: chunked" and run it:
curl -i --insecure -X POST http://192.168.51.21:5000/v2.0/tokens -H
"Content-Type: application/json" -H "Accept: application/json" -H
"User-Agent: python-keystoneclient" -H "Transfer-Encoding: chunked" -d
'{"auth": {"tenantName": "demo", "passwordCredentials": {"username":
"demo", "password": "admin"}}}'
5. You will get a cli error:
HTTP/1.1 500 Internal Server Error
Date: Wed, 16 Jul 2014 19:01:58 GMT
Server: Apache/2.2.22 (Ubuntu)
Vary: X-Auth-Token
Content-Length: 215
Connection: close
Content-Type: application/json
{"error": {"message": "An unexpected error prevented the server from
fulfilling your request: request data read error (Disable debug mode
to suppress these details.)", "code": 500, "title": "Internal Server
Error"}}
6. The keystone log will show a stack trace:
[Wed Jul 16 19:02:43 2014] [error] 13693 ERROR keystone.common.wsgi [-]
request data read error
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi Traceback
(most recent call last):
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi File
"/opt/stack/keystone/keystone/common/wsgi.py", line 414, in __call__
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi
response = self.process_request(request)
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi File
"/opt/stack/keystone/keystone/middleware/core.py", line 112, in process_request
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi
params_json = request.body
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi File
"/usr/local/lib/python2.7/dist-packages/webob/request.py", line 677, in
_body__get
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi
self.make_body_seekable() # we need this to have content_length
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi File
"/usr/local/lib/python2.7/dist-packages/webob/request.py", line 922, in
make_body_seekable
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi
self.copy_body()
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi File
"/usr/local/lib/python2.7/dist-packages/webob/request.py", line 938, in
copy_body
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi
self.body = self.body_file_raw.read()
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi File
"/opt/stack/keystone/keystone/common/utils.py", line 306, in read
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi
result = self.data.read()
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi IOError:
request data read error
[Wed Jul 16 19:02:43 2014] [error] 13693 TRACE keystone.common.wsgi
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1346211/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp