Bad request response served with 200 status code on metadata delete

Bug #1131215 reported by Attila Fazekas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Low
Unassigned

Bug Description

The '{ d }' considered as an invalid key by the nova, but the HTTP status code is 200, in the response.

tempest.common.rest_client: INFO: Request: DELETE http://10.34.131.210:8774/v2/50b11029b6d44f41922610b3c7ed7379/servers/999/metadata/{ d }
tempest.common.rest_client: DEBUG: Request Headers: {'X-Auth-Token': '<Token omitted>'}
tempest.common.rest_client: INFO: Response Status: 200
tempest.common.rest_client: DEBUG: Response Body: <head>
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code 400.
<p>Message: Bad request syntax ('DELETE /v2/50b11029b6d44f41922610b3c7ed7379/servers/999/metadata/{ d } HTTP/1.1').
<p>Error code explanation: 400 = Bad request syntax or unsupported method.
</body>

You can modify tempest.tests.compute.servers.test_servers_metadata.test_delete_nonexistant_server_metadata_item in order to reproduce the issue.

I also wonder is HTML response format the default ?

Revision history for this message
Vish Ishaya (vishvananda) wrote :

so the issue is spaces in the request is rejected by our http server before it ever gets into our wsgi stack.

Changed in nova:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Vish Ishaya (vishvananda)
Revision history for this message
Vish Ishaya (vishvananda) wrote :

So the server isn't sending back an error code because it doesn't know what http version you are trying to send because of the extra spaces. Modifying the python basic http server to return special error codes seems a bit much, but we could at least improve the logging we get internally to match the rest of our logs.

Changed in nova:
assignee: Vish Ishaya (vishvananda) → nobody
importance: High → Low
status: In Progress → Triaged
lizheming (lizheming-li)
Changed in nova:
assignee: nobody → lizheming (lizheming-li)
lizheming (lizheming-li)
Changed in nova:
assignee: lizheming (lizheming-li) → nobody
Kent Wang (k.wang)
Changed in nova:
assignee: nobody → Kent Wang (k.wang)
Sean Dague (sdague)
Changed in nova:
status: Triaged → Won't Fix
assignee: Kent Wang (k.wang) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.