Keystone V3 authentication return BadRequest: Malformed request url
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Invalid
|
Undecided
|
Unassigned | ||
OpenStack Compute (nova) |
Invalid
|
Low
|
Unassigned |
Bug Description
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=
export OS_DOMAIN_
export OS_AUTH_URL="http://
export OS_IDENTITY_
My endpoint of cinder public URL is like http://
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/
if (context and project_id and (project_id != context.
msg = _("Malformed request url")
return Fault(webob.
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/
ERROR log is as below:
REQ: curl -i http://
INFO: requests.
DEBUG: requests.
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-
RESP BODY: {"badRequest": {"message": "Malformed request url", "code": 400}}
ERROR: openstack Malformed request url (HTTP 400) (Request-ID: req-39a96150-
Traceback (most recent call last):
File "/usr/lib/
result = cmd.run(
File "/usr/lib/
column_names, data = self.take_
File "/usr/lib/
data = volume_
File "/usr/lib/
"volumes")
File "/usr/lib/
resp, body = self.api.
File "/usr/lib/
return self._cs_
File "/usr/lib/
**kwargs)
File "/usr/lib/
raise exceptions.
BadRequest: Malformed request url (HTTP 400) (Request-ID: req-39a96150-
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Low |
summary: |
- Cinder volume command with keystone V3 authentication return BadRequest: - Malformed request url + Keystone V3 authentication return BadRequest: Malformed request url |
Changed in nova: | |
status: | Confirmed → Triaged |
description: | updated |
tags: | added: api low-hanging-fruit |
Changed in nova: | |
assignee: | nobody → David Cheperdak (djbchepe) |
assignee: | David Cheperdak (djbchepe) → nobody |
Changed in nova: | |
status: | Triaged → Invalid |
Add full log before REQ,
# openstack --debug volume list .shell compute API version 2, cmd group openstack. compute. v2 .shell network API version 2, cmd group openstack. network. v2 .shell image API version 1, cmd group openstack.image.v1 .shell volume API version 1, cmd group openstack.volume.v1 .shell identity API version 3, cmd group openstack. identity. v3 .shell object_store API version 1, cmd group openstack. object_ store.v1 parse(' table = cliff.formatter s.table: TableFormatter' ) parse(' csv = cliff.formatter s.commaseparate d:CSVLister' ) .shell prepare_ to_run_ command ListVolume .shell validating authentication options .identity. client Instantiating identity client: <class 'keystoneclient .v3.client. Client' > .identity. client Using password auth auth.identity. v3 Making authentication request to http:// **.**.* *.**:35357/ v3/auth/ tokens packages. urllib3. connectionpool Starting new HTTP connection (1): **.**.**.** packages. urllib3. connectionpool "POST /v3/auth/tokens HTTP/1.1" 201 4434 .volume. v1.volume. ListVolume take_action( Namespace( all_projects= False, columns=[], formatter='table', long=False, max_width=0, name=None, quote_mode= 'nonnumeric' , status=None)) .volume. client Instantiating volume client: <class 'cinderclient. v1.client. Client' > **.**.* *.**:8776/ v1/cbe4b1d87fbb 4318be379a79a57 0b7ec/volumes/ detail -X GET -H "User-Agent: python- cinderclient" -H "Accept: application/json" -H "X-Auth-Token: 53a14c48b0db402 3a9dc454dfc661e 70"
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: stevedore.extension found extension EntryPoint.
DEBUG: stevedore.extension found extension EntryPoint.
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: keystoneclient.
INFO: requests.
DEBUG: requests.
DEBUG: openstackclient
DEBUG: openstackclient
DEBUG: cinderclient.client
REQ: curl -i http://