Bug 1213988 - RGW Swift API: response for PUT on /container does not contain the mandatory Content-Length header when FCGI is used
Summary: RGW Swift API: response for PUT on /container does not contain the mandatory ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW
Version: 1.2.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 1.2.4
Assignee: Yehuda Sadeh
QA Contact: Tamil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-21 17:19 UTC by Yehuda Sadeh
Modified: 2022-02-21 18:29 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-02 14:07:32 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 11036 0 None None None Never
Red Hat Issue Tracker RHCEPH-3438 0 None None None 2022-02-21 18:29:30 UTC
Red Hat Product Errata RHBA-2015:1703 0 normal SHIPPED_LIVE ceph-radosgw and librbd package bug-fix update 2015-09-02 18:07:13 UTC

Description Yehuda Sadeh 2015-04-21 17:19:16 UTC
Description of problem:

Swift expects a Content-Length header on a container creation request


How reproducible:
always


Steps to Reproduce:
1. Create a container (bucket) through the swift api

Actual results:
No Content-Length header in the response (chunked response).


Expected results:
Content-Length header in the response


Additional info:
Fixed upstream

Comment 1 Federico Lucifredi 2015-04-22 16:48:16 UTC
Fcgi is not 1.3, it is 1.2.z, adjusting accordingly. Yehuda, please flag if I am wrong.

Comment 2 Yehuda Sadeh 2015-06-30 17:50:03 UTC
need qa_ack

Comment 7 Tamil 2015-08-13 01:47:25 UTC
tested this on 1.2.4 on magna016, still seeing the same error,

[ubuntu@magna016 ~]$curl -X PUT -H "X-Auth-Token: AUTH_rgwtk0e00000074657374757365723a73776966747d04ffb8446e91dddb79cd5578527d12247f78316f225f238b834e9eebf3b8ad8a60b43a" -H "X-Container-Read: .r:*" http://10.8.128.16/swift/v1/nwq/nano
MissingContentLength

Comment 8 Yehuda Sadeh 2015-08-13 02:04:45 UTC
The response your seeing is what we return because you didn't provide content length in the request, not really related to the actual big you're testing. You need to provide content length header to the request, and then see whether we return the appropriate header.

Comment 9 Tamil 2015-08-13 18:48:08 UTC
yes, verified this bug and looks good,

[ubuntu@magna016 ~]$ curl -i http://10.8.128.16/swift/v1/my-new-buckets -X PUT -H "Content-Length: 0"  -H "X-Auth-Token: AUTH_rgwtk0e00000074657374757365723a73776966747d04ffb8446e91dddb79cd5578527d12247f78316f225f238b834e9eebf3b8ad8a60b43a" 
HTTP/1.1 201 Created
Date: Thu, 13 Aug 2015 22:47:54 GMT
Accept-Ranges: bytes
Content-Length: 0
Connection: close
Content-Type: text/plain; charset=utf-8

Comment 10 Warren 2015-08-26 05:17:00 UTC
Works on 1.2.3.2 trusty and precise

Comment 11 Warren 2015-09-01 02:25:09 UTC
Failed on Centos 6.7

On Centos 6.7 I ran the commands below and got a zero length value

1. create a bucket
2. curl -i http://<ip of the rgw host>/swift/v1/<bucket_name> -X PUT -H "Content-Length: 0" -H "X-Auth-Token: <Auth-token>"
[inorder to find auth token, use the swift command below,
swift -A http://{IP ADDRESS}/auth/1.0 -U testuser:swift -K '{swift_secret_key}' stats -v ]
3. verify the content-length is displayed in the output.

Comment 12 Warren 2015-09-02 01:24:23 UTC
Whoops.  looks like zero length is correct.

Passed on Centos 6.7

Comment 14 errata-xmlrpc 2015-09-02 14:07:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1703.html


Note You need to log in before you can comment on or make changes to this bug.