Skip to content

Wip cbodley multipart nostreaming#564

Merged
cbodley merged 6 commits intoceph:masterfrom
linuxbox2:wip-cbodley-multipart-nostreaming
Jul 4, 2024
Merged

Wip cbodley multipart nostreaming#564
cbodley merged 6 commits intoceph:masterfrom
linuxbox2:wip-cbodley-multipart-nostreaming

Conversation

@mattbenjamin
Copy link
Copy Markdown
Contributor

No description provided.

@mattbenjamin mattbenjamin requested a review from cbodley May 1, 2024 21:36
Comment on lines +13550 to +13556
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}]})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown

@rkhudov rkhudov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I might be not the right person to review, but just wanted to add small comments

Comment on lines +13440 to +13445
size = 1024
body = FakeWriteFile(size, 'A')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 :)

@mattbenjamin mattbenjamin deleted the wip-cbodley-multipart-nostreaming branch June 22, 2024 21:34
@mattbenjamin mattbenjamin restored the wip-cbodley-multipart-nostreaming branch June 22, 2024 21:35
@mattbenjamin mattbenjamin reopened this Jun 23, 2024
@mattbenjamin mattbenjamin force-pushed the wip-cbodley-multipart-nostreaming branch 2 times, most recently from 5d03dbf to f522cb4 Compare July 1, 2024 18:23
@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented Jul 2, 2024

mattbenjamin wants to merge 200 commits

i think something went wrong with the rebase here

cbodley and others added 6 commits July 3, 2024 09:52
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>
@mattbenjamin mattbenjamin force-pushed the wip-cbodley-multipart-nostreaming branch from 9bae29e to 8277a9f Compare July 3, 2024 13:53
@cbodley cbodley merged commit 36fb297 into ceph:master Jul 4, 2024
@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented Jul 5, 2024

i've cherry-picked these to ceph-master

@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented Jun 19, 2025

cherry-picked to ceph-squid for ceph/ceph#62312

@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented Jun 20, 2025

reverting on ceph-squid until the ceph/ceph#62312 backport has everything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants