Certificates API hangs if request body is omitted

Bug #1659641 reported by Jason Dunsmore
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
New
Undecided
Jason Dunsmore
OpenStack Global Requirements
Fix Released
Undecided
Jason Dunsmore

Bug Description

Calling the "PATCH /certificates/<cluster-id>" API with an empty body works:

$ curl -g -i -X PATCH http://localhost:9511/v1/certificates/4230cc5c-39da-42bf-a15e-436ee47e12ee -H "OpenStack-API-Version: container-infra latest" -H "X-Auth-Token: $(openstack token issue -f value | sed -n 2p)" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: None" -d '{}'
HTTP/1.0 400 Bad Request
[...]

But when "-d '{}'" is omitted from the curl command, the API hangs:

$ curl -g -i -X PATCH http://localhost:9511/v1/certificates/4230cc5c-39da-42bf-a15e-436ee47e12ee -H "OpenStack-API-Version: container-infra latest" -H "X-Auth-Token: $(openstack token issue -f value | sed -n 2p)" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: None"

Calls to pecan.request.body cause the API to hang.

Traceback:
http://paste.openstack.org/show/596614/

Changed in magnum:
assignee: nobody → Jason Dunsmore (jasondunsmore)
Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :

This is probably a pecan bug. I've submitted a Github Issue in the pecan project https://github.com/pecan/pecan/issues/87

Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :

It's an upstream bug https://github.com/Pylons/webob/issues/233 fixed by https://github.com/Pylons/webob/pull/283 which is in WebOb>=1.7.0

Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :

Change to global requirements (https://review.openstack.org/#/c/425950/) will have to wait until after feature freeze. In the meantime, we can either pass an empty string as the request body "-d ''" or pass the header "Content-Length: 0".

Changed in openstack-requirements:
assignee: nobody → Jason Dunsmore (jasondunsmore)
Revision history for this message
Matthew Thode (prometheanfire) wrote :

this was merged in requirements, closing

Changed in openstack-requirements:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements 1.1.0

This issue was fixed in the openstack/requirements 1.1.0 release.

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.