Activity log for bug #1441922

Date Who What changed Old value New value Message
2015-04-09 01:03:44 Jin Liu bug added bug
2015-04-09 03:28:29 Koji Iida bug added subscriber Koji Iida
2015-04-09 19:52:07 Jin Liu cinder: importance Undecided Medium
2015-04-09 19:52:39 Jin Liu cinder: importance Medium Undecided
2015-04-10 17:11:49 Jin Liu bug task added nova
2015-05-05 19:53:23 Sylvain Bauza nova: status New Confirmed
2015-05-05 19:53:27 Sylvain Bauza nova: importance Undecided Low
2015-05-05 19:54:41 Sylvain Bauza summary Cinder volume command with keystone V3 authentication return BadRequest: Malformed request url Keystone V3 authentication return BadRequest: Malformed request url
2015-05-05 19:54:47 Sylvain Bauza nova: status Confirmed Triaged
2015-05-05 19:55:44 Sylvain Bauza description When using keystone V3 authentication for cinder, I got error "BadRequest: Malformed request url (HTTP 400)". I am testing on Juno release, my keystone v3 env is like this, export OS_USERNAME="admin" export OS_PASSWORD="password" export OS_DOMAIN_NAME=default export OS_AUTH_URL="http://$MY_HOST:35357/v3" export OS_IDENTITY_API_VERSION=3 My endpoint of cinder public URL is like http://**.**.**.**:8776/v1/cbe4b1d87fbb4318be379a79a570b7ec (I hided the real IP) When run command "openstack --debug volume list" or "openstack --debug volume create --size 1 jin", I got this BadRequest error. From debug info, this error comes from cinder server. I added log in cinder/api/openstack/wsgi.py function _process_stack(), found the context.project_id is None while project_id has a value, here return the error. if (context and project_id and (project_id != context.project_id)): msg = _("Malformed request url") return Fault(webob.exc.HTTPBadRequest(explanation=msg)) I compared with another keystone V2 authentication server, the context.project_id is same as project_id. Maybe this is difference, in v2 server the REQ has one more Project-id like "curl -i -H "X-Auth-Project-Id: admin". I found the cinder.context maybe come from cinder/api/middleware/auth.py, the project_id in cinder.context may not be assigned a value in keystone v3 authentication scenario. ERROR log is as below: REQ: curl -i http://**.**.**.**:8776/v1/cbe4b1d87fbb4318be379a79a570b7ec/volumes/detail -X GET -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: e883e05a887144d4ae70151c976ce666" INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): **.**.**.** DEBUG: requests.packages.urllib3.connectionpool "GET /v1/cbe4b1d87fbb4318be379a79a570b7ec/volumes/detail HTTP/1.1" 400 65 DEBUG: cinderclient.client RESP: [400] {'date': 'Thu, 09 Apr 2015 00:35:30 GMT', 'content-length': '65', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-39a96150-b9ab-4753-8b02-d5730492b288', 'x-openstack-request-id': 'req-39a96150-b9ab-4753-8b02-d5730492b288'} RESP BODY: {"badRequest": {"message": "Malformed request url", "code": 400}} ERROR: openstack Malformed request url (HTTP 400) (Request-ID: req-39a96150-b9ab-4753-8b02-d5730492b288) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/cliff/app.py", line 280, in run_subcommand result = cmd.run(parsed_args) File "/usr/lib/python2.7/site-packages/cliff/display.py", line 91, in run column_names, data = self.take_action(parsed_args) File "/usr/lib/python2.7/site-packages/openstackclient/volume/v1/volume.py", line 255, in take_action data = volume_client.volumes.list(search_opts=search_opts) File "/usr/lib/python2.7/site-packages/cinderclient/v1/volumes.py", line 220, in list "volumes") File "/usr/lib/python2.7/site-packages/cinderclient/base.py", line 70, in _list resp, body = self.api.client.get(url) File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 302, in get return self._cs_request(url, 'GET', **kwargs) File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 269, in _cs_request **kwargs) File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 252, in request raise exceptions.from_response(resp, body) BadRequest: Malformed request url (HTTP 400) (Request-ID: req-39a96150-b9ab-4753-8b02-d5730492b288) When using keystone V3 authentication for cinder and nova (see comment #3), I got error "BadRequest: Malformed request url (HTTP 400)". I am testing on Juno release, my keystone v3 env is like this, export OS_USERNAME="admin" export OS_PASSWORD="password" export OS_DOMAIN_NAME=default export OS_AUTH_URL="http://$MY_HOST:35357/v3" export OS_IDENTITY_API_VERSION=3 My endpoint of cinder public URL is like http://**.**.**.**:8776/v1/cbe4b1d87fbb4318be379a79a570b7ec (I hided the real IP) When run command "openstack --debug volume list" or "openstack --debug volume create --size 1 jin", I got this BadRequest error. From debug info, this error comes from cinder server. I added log in cinder/api/openstack/wsgi.py function _process_stack(), found the context.project_id is None while project_id has a value, here return the error. if (context and project_id and (project_id != context.project_id)):             msg = _("Malformed request url")             return Fault(webob.exc.HTTPBadRequest(explanation=msg)) I compared with another keystone V2 authentication server, the context.project_id is same as project_id. Maybe this is difference, in v2 server the REQ has one more Project-id like "curl -i -H "X-Auth-Project-Id: admin". I found the cinder.context maybe come from cinder/api/middleware/auth.py, the project_id in cinder.context may not be assigned a value in keystone v3 authentication scenario. ERROR log is as below: REQ: curl -i http://**.**.**.**:8776/v1/cbe4b1d87fbb4318be379a79a570b7ec/volumes/detail -X GET -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: e883e05a887144d4ae70151c976ce666" INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): **.**.**.** DEBUG: requests.packages.urllib3.connectionpool "GET /v1/cbe4b1d87fbb4318be379a79a570b7ec/volumes/detail HTTP/1.1" 400 65 DEBUG: cinderclient.client RESP: [400] {'date': 'Thu, 09 Apr 2015 00:35:30 GMT', 'content-length': '65', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-39a96150-b9ab-4753-8b02-d5730492b288', 'x-openstack-request-id': 'req-39a96150-b9ab-4753-8b02-d5730492b288'} RESP BODY: {"badRequest": {"message": "Malformed request url", "code": 400}} ERROR: openstack Malformed request url (HTTP 400) (Request-ID: req-39a96150-b9ab-4753-8b02-d5730492b288) Traceback (most recent call last):   File "/usr/lib/python2.7/site-packages/cliff/app.py", line 280, in run_subcommand     result = cmd.run(parsed_args)   File "/usr/lib/python2.7/site-packages/cliff/display.py", line 91, in run     column_names, data = self.take_action(parsed_args)   File "/usr/lib/python2.7/site-packages/openstackclient/volume/v1/volume.py", line 255, in take_action     data = volume_client.volumes.list(search_opts=search_opts)   File "/usr/lib/python2.7/site-packages/cinderclient/v1/volumes.py", line 220, in list     "volumes")   File "/usr/lib/python2.7/site-packages/cinderclient/base.py", line 70, in _list     resp, body = self.api.client.get(url)   File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 302, in get     return self._cs_request(url, 'GET', **kwargs)   File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 269, in _cs_request     **kwargs)   File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 252, in request     raise exceptions.from_response(resp, body) BadRequest: Malformed request url (HTTP 400) (Request-ID: req-39a96150-b9ab-4753-8b02-d5730492b288)
2015-05-05 19:55:58 Sylvain Bauza tags api low-hanging-fruit
2015-05-07 19:58:27 Jin Liu cinder: status New Invalid
2015-05-16 22:55:25 David Cheperdak nova: assignee David Cheperdak (djbchepe)
2015-05-16 22:58:11 David Cheperdak nova: assignee David Cheperdak (djbchepe)
2015-06-12 20:59:47 Davanum Srinivas (DIMS) nova: status Triaged Invalid