Conversation
| response = client.complete_multipart_upload(Bucket=bucket, Key=key, UploadId=upload_id, ChecksumSHA256=composite_sha256sum, MultipartUpload={'Parts': [ | ||
| {'ETag': etag1, 'ChecksumSHA256': response['ChecksumSHA256'], 'PartNumber': 1}, | ||
| {'ETag': etag2, 'ChecksumSHA256': response['ChecksumSHA256'], 'PartNumber': 2}, | ||
| {'ETag': etag3, 'ChecksumSHA256': response['ChecksumSHA256'], 'PartNumber': 3}]}) |
There was a problem hiding this comment.
this is passing the same ChecksumSHA256 value for each part, which comes from the last upload_part() response. CompleteMultipart should check that these checksums match the parts and reject such a request
you should be able to pass part1_sha256sum etc for these values
rkhudov
left a comment
There was a problem hiding this comment.
Sorry, I might be not the right person to review, but just wanted to add small comments
| size = 1024 | ||
| body = FakeWriteFile(size, 'A') |
There was a problem hiding this comment.
| size = 1024 | |
| body = FakeWriteFile(size, 'A') | |
| body = FakeWriteFile(1024, 'A') |
Since it is not used inside the test except this place, can some some memory to not assign a variable to it :)
5d03dbf to
f522cb4
Compare
i think something went wrong with the rebase here |
this removes a Pytest warning during execution Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
…-multipart As described in https://tracker.ceph.com/issues/65746, retrying complete-multipart after having attempted to complete the same upload with a bad checksum argument fails with an internal error. The status code is 500, but I'm unsure if it can be retried again, or whether the upload can be aborted later. Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
tests a full multipart upload cycle with 3 unique parts, which verifies composite checksum computation and the logic to propagate parts_count to ComleteMultipart Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
this tests a two-megabyte binary upload with validated (awscli-computed) SHA256 checksum, and also verifies failure when a bad checksum is provided Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
also add @pytest.mark.checksum for new checksum tests Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
9bae29e to
8277a9f
Compare
|
i've cherry-picked these to ceph-master |
|
cherry-picked to ceph-squid for ceph/ceph#62312 |
|
reverting on ceph-squid until the ceph/ceph#62312 backport has everything |
No description provided.