squid: rgw: implement S3 additional checksum support#62312
squid: rgw: implement S3 additional checksum support#62312adamemerson wants to merge 37 commits intoceph:squidfrom
Conversation
|
Need to backport dependencies… |
2662c3b to
a8e6397
Compare
a8e6397 to
75f13c1
Compare
cbodley
left a comment
There was a problem hiding this comment.
per @mattbenjamin, we shouldn't merge to squid without followup changes in #61878
Support uses conditionally compiled implementations from spdk and ISA-L. Validated against SPDK test vectors and one example generated and passed via awscliv2 (AWS SDK) version 2.24.5. Restored the ability of unittest_rgw_cksum to create a binary input file for external checksum testing, but only when requested via cmdline option. Fixes: https://tracker.ceph.com/issues/70040 Signed-off-by: Matt Benjamin <[email protected]>
These constructions provide conforming implemenations of Amazon S3 CRC32 (ISO hdlc), CRC32C (iscsi), and CRC64/NVME checksums, in particular, linear combining of adjacent checksums, by Mark Adler. Source: https://github.com/madler/crcany License: approximate BSD with "optional" advertising clause Signed-off-by: Matt Benjamin <[email protected]>
* internally compensate for at-rest byteswapped crc64 representation (e.g., before combine step)
* generalize Cksum crc api for 32bit and 64bit crcs, other cleanup
* prototype abstract cksum::Combiner workflow
* add support for forward and backward handling of composite vs full object checksums
by marking the composites and the update flag day
* clean up checksum formatting and checksum type reporting
* add unit tests for Combiner interface
* validate and track requested checksum type (i.e., composite or full), plus
unit test fixture for combinations of full matrix of cksum types
* doh. GET/HEAD checksums are in headers
* add crcany license to COPYING
* return ChecksumType as header in GET/HEAD
Found by Casey in review
* avoid fmt of char* null when no checksum header supplied
A cksum_hdr_t(nullptr, nullptr) results in this case, and is intended,
but its components obviously can't be presented to std::format unless
cast to a safe pointer type.
* fail checksum mismatch with BadDigest
When uploading an S3 object with an invalid checksum, the return code
should be BadDigest to mirror more closely the AWS S3 implementation.
See: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
Fixes: https://tracker.ceph.com/issues/70614
Reported by Alex Wojno <[email protected]>
* fix comparison and display of composite checksums
A string comparision bounds error and a bitmask comparison
error are fixed.
* fix build on centos9
On gcc(?13?) we can't declare rgw::cksum::FLAG_NONE
and also rgw::cksum::Cksum::FlAG_NONE.
SAD!!
* include <variant> invariantly
* fix checksum type return from complete-multipart
This one is in the XML response
* aieee, don't leak Combiners
Use unique_ptr to polymorphic type...correctly.
Signed-off-by: Matt Benjamin <[email protected]>
Signed-off-by: matt benjamin <[email protected]>
e8ebf03 to
43525f8
Compare
|
with today's update (also pullup), this backport contains the complete S3 additional checksum feature |
|
@anrao19 Could you please pull this into a run on squid when you do one? |
@adamemerson this needs to be validated against the appropriate checksum s3-tests. someone will need to do that manually |
@mattbenjamin Can you backport the Checksum tests to a branch based on squid s3tests? I can run the tests against that. |
|
@adamemerson I've created ceph/s3-tests#685 |
@adamemerson did qa include these test cases? |
No. I'll run an RGW suite against it with the s3tests branch specified. |
thanks. and sorry, i know it's a huge pain :( |
|
@mattbenjamin Do you have a branch of backported s3-tests? I think I remember you mentioning making one, but I don't recall the name. |
Never mind, I see it there. Sorry |
|
@mattbenjamin Take a look at this test run here, are we missing any further backports? |
|
@yuriw We'll QA this one ourselves since it has s3-tests requirements |
Adds new Blake3 digest format (native), a concrete type to
represent digests, and static_visitor machinery to unify varying
checksum computations.
This framework, together with new trailing checksum header support,
is used to implement S3 additional checksum verification. Parts of
the AWS content checksum API work build on a prior contribution from
imtzw [email protected].
Thank you!
Fixes: https://tracker.ceph.com/issues/42080
Fixes: https://tracker.ceph.com/issues/63951
squashed commits:
Fixes: https://tracker.ceph.com/issues/66837
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition