Repository navigation
Test object PUT with chunked transfer encoding - #501
Conversation
Before the RGW fix PR was responding with 411 instead of 200 RGW fix PR: ceph/ceph#50235 Signed-off-by: Mark Kogan <[email protected]>
razdob15
left a comment
There was a problem hiding this comment.
ContentLength header shouldn't be sent.
|
|
||
|
|
||
| def _ev_add_te_header(request, **kwargs): | ||
| request.headers.add_header('Transfer-Encoding', 'chunked') |
There was a problem hiding this comment.
The error the cu gets is 411: MissigContentLength.
Hence, in addition to the te header addition, you have to ensure that the ContentLength header does not exist in the request, in order to reproduce the exact error in this test.
There was a problem hiding this comment.
Before the RGW fix PR was responding with 411 instead of 200
i'm seeing the same behavior that @mkogan1 claimed in the PR description. running against radosgw without the fix from ceph/ceph#50235, it doesn't get a content-length header so rejects the request with 411:
FAILED s3tests_boto3/functional/test_s3.py::test_object_write_with_chunked_transfer_encoding - botocore.exceptions.ClientError: An error occurred (MissingContentLength) when calling the PutObject operation: Unknown
i assume that boto isn't adding a content-length header because it sees the transfer-encoding header; are you seeing a case where boto still sends a content-length?
There was a problem hiding this comment.
@razdob15 corroborating, as @cbodley said - inspecting debug_rgw=20 logs of the test run,
the ContentLength header does not exist when HTTP_TRANSFER_ENCODING=chunked
less ./out/radosgw.8000.log
...
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_ACCEPT_ENCODING=identity
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_AMZ_SDK_INVOCATION_ID=313aaf03-4a88-4144-ae47-83f1b085fd14
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_AMZ_SDK_REQUEST=attempt=1
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_AUTHORIZATION=AWS4-HMAC-SHA256 Credential=0555b35654ad1656d804/20230308/us-east-1/s3/aws4_request, SignedHeaders=conten
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_CONTENT_MD5=N7UdGUp1E+RbVvZSTy1R8g==
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_EXPECT=100-continue
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_HOST=localhost:8000
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_TRANSFER_ENCODING=chunked
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_USER_AGENT=Boto3/1.23.10 Python/3.6.8 Linux/5.16.2-1.el8.elrepo.x86_64 Botocore/1.26.10
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_VERSION=1.1
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_X_AMZ_CONTENT_SHA256=fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 HTTP_X_AMZ_DATE=20230308T083728Z
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 REMOTE_ADDR=::1
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 REQUEST_METHOD=PUT
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 REQUEST_URI=/yournamehere-ar5dkrz1pexwp87r-109/foo
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 SCRIPT_URI=/yournamehere-ar5dkrz1pexwp87r-109/foo
2023-03-08T08:37:28.196+0000 7ffed2ff5700 20 SERVER_PORT=8000
2023-03-08T08:37:28.196+0000 7ffed2ff5700 1 ====== starting new request req=0x7fffe07f7060 =====
...
2023-03-08T08:37:28.205+0000 7ffeddffb700 1 ====== req done req=0x7fffe07f7060 op status=0 http_status=200 latency=0.009000175s ======
2023-03-08T08:37:28.205+0000 7ffeddffb700 1 beast: 0x7fffe07f7060: ::1 - testid [08/Mar/2023:08:37:28.196 +0000] "PUT /yournamehere-ar5dkrz1pexwp87r-109/foo HTTP/1.1" 200 3 - "Boto3/1.23.10 Python/3.6.8 Linux/5.16.2-1.el8.elrepo.x86_64 Botocore/1.26.10" - latency=0.009000175s
|
this test passed teuthology at: |
|
cherry-picked to ceph-master |
Before the RGW fix PR was responding with 411 instead of 200
RGW fix PR: ceph/ceph#50235