Skip to content

Comments

rgw_cksum: permit fallback to checksum-type from create-multipart, in…#60282

Closed
mattbenjamin wants to merge 2 commits intoceph:mainfrom
linuxbox2:wip-cksum-68513
Closed

rgw_cksum: permit fallback to checksum-type from create-multipart, in…#60282
mattbenjamin wants to merge 2 commits intoceph:mainfrom
linuxbox2:wip-cksum-68513

Conversation

@mattbenjamin
Copy link
Contributor

… upload-part

There appear to be workloads that provide a checksum algorithm in create-multipart-upload, but do not provide (what must be) the corresponding algorithm when uploading the parts. (complete-multipart-upload has no checksum argument, the value is implicit.)

This behavior is inconsistent with at least some SDKs, but it is possibly accepted behavior in AWS S3, and is not logically necessary, since the originally supplied checksum type is already known.

Therefore, change the behavior of upload-part to fall back to a checksum type that was sent with the corresponding create-multipart-upload request, if one is present, rather than failing with InvalidRequest.

Fixes: https://tracker.ceph.com/issues/68513

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • [ x] References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • [ x] No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • [ x] No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@mattbenjamin mattbenjamin self-assigned this Oct 12, 2024
@mattbenjamin mattbenjamin requested a review from a team as a code owner October 12, 2024 20:48
@github-actions github-actions bot added the rgw label Oct 12, 2024
@mattbenjamin
Copy link
Contributor Author

(will provide s3-test)

@mattbenjamin
Copy link
Contributor Author

ceph/s3-tests#596

@adamemerson adamemerson requested a review from ivancich October 17, 2024 15:33

if (cksum_filter) {
const auto& hdr = cksum_filter->header();
auto expected_ck = cksum_filter->expected(*s->info.env);
Copy link
Member

Choose a reason for hiding this comment

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

For readability I think it would help to do away with the auto and instead spell out the actual type and comment as to what info it'll return.

cksum_filter->verify(*s->info.env); // valid or no supplied cksum
cksum = get<1>(cksum_verify);
if (std::get<0>(cksum_verify)) {
if ((!expected_ck) ||
Copy link
Member

Choose a reason for hiding this comment

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

We need a comment to explain the logic of this conditional.

@ivancich ivancich self-requested a review October 29, 2024 17:22
Copy link
Member

@ivancich ivancich left a comment

Choose a reason for hiding this comment

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

nit: I request a few comments to help explain the logic

… upload-part

There appear to be workloads that provide a checksum algorithm in
create-multipart-upload, but do not provide (what must be) the
corresponding algorithm when uploading the parts.  (complete-multipart-upload
has no checksum argument, the value is implicit.)

This behavior is inconsistent with at least some SDKs, but it is
possibly accepted behavior in AWS S3, and is not logically necessary,
since the originally supplied checksum type is already known.

Therefore, change the behavior of upload-part to fall back to a
checksum type that was sent with the corresponding create-multipart-upload
request, if one is present, rather than failing with InvalidRequest.

Fixes: https://tracker.ceph.com/issues/68513

Signed-off-by: Matt Benjamin <[email protected]>
Improve readability based on feedback from Eric Ivancich review.

Signed-off-by: Matt Benjamin <[email protected]>
@mattbenjamin
Copy link
Contributor Author

this doesnt seem to be a pass; there are 4 instances of java s3-tests failing, and one failure of hadoop s3a; none appears to be a java checksum test. Will investigate further.

@ivancich
Copy link
Member

ivancich commented Jan 2, 2025

this doesnt seem to be a pass; there are 4 instances of java s3-tests failing, and one failure of hadoop s3a; none appears to be a java checksum test. Will investigate further.

Please re-run. I submitted some PRs in the last month or so that fixed a lot of this testing.

@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Mar 12, 2025
@cbodley
Copy link
Contributor

cbodley commented Mar 28, 2025

is this still needed?

@github-actions github-actions bot removed the stale label Mar 28, 2025
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label May 27, 2025
@github-actions
Copy link

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions bot closed this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants