rgw: cksum: implement support for new CRC64NVME checksum algorithm and related fixes#61878
rgw: cksum: implement support for new CRC64NVME checksum algorithm and related fixes#61878
Conversation
716488b to
d6b81e1
Compare
|
(there is no relationship to nvmeof; one commit incorrectly changed the nvmeof/gateway submodule, that's fixed) |
|
now that you're using the madler crc library, do we still need the bits from spdk? if so, is there a reason we can't pull up our spdk submodule and link to that? are the madler files coming from this https://github.com/madler/crcany repo? why not add that as a submodule? p.s. please update COPYING with the added licenses |
|
some todo-list items:
|
|
spdk: as discussed, the checksums here have simd acceleration and do seem to be in both isa-l standalone and the most recent versions of spdk, so there will be some way to remove these, but right now, I seem to need the table versions here. Can be improved with some build work. crcany (madler) provides table-based combining methods that work, I intend to rely on them only for that, and as cross checks on the others. |
|
crcany: it could be a submodule; is it worth it? |
|
related s3-tests branch: ceph/s3-tests#626 |
bd16d85 to
f95b874
Compare
|
@cbodley just rebased, am having confusing misbehavior. I've successfully completed a multipart upload with CRC64NVME checksum. but when my s3-test does a HEAD request with ChecksumMode = ENABLED, it is getting the right data from the stored checksujm it is adding the correct information to the formatter (below), but the s3-test logic is failing with
here's what the rgw log says: |
|
I've debugged this, the head request is succeeding, but just doesn't have the checksum element in it |
d396c19 to
c8fadc9
Compare
|
@cbodley ok never mind, thanks for spotting the issue in slack |
355a56b to
e03b659
Compare
src/rgw/rgw_rest_s3.cc
Outdated
| __func__, cksum.element_name(), cksum.to_armor()); | ||
| dump_header(s, cksum.header_name(), armored_cksum); | ||
| } | ||
| dump_header(s, "ChecksumType", std::get<1>(cksum_type)); |
There was a problem hiding this comment.
ChecksumType -> x-amz-checksum-type
e03b659 to
4ad280b
Compare
|
also, github is saying there are modified submodules, but I don't think that's the case |
|
I'll check into whether jenkins is broken tomorrow, before rebasing |
28e51ee to
f89aa0c
Compare
|
not your fault. there's a fix in #62515 |
|
Should be good now; retriggering the check bots. |
|
jenkins retest this please |
Signed-off-by: Matt Benjamin <[email protected]>
Signed-off-by: Matt Benjamin <[email protected]>
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]>
d3c7ca4 to
6aa4ec9
Compare
|
jenkins test submodules |
51625bc to
2c037bf
Compare
|
the earlier run passed, but was missing some validation steps, re-run (also, rebased to the latest s3-tests/master): |
dafec13 to
c2c0555
Compare
|
consider squashing some of the fix commits? especially if you're interested in backports |
* 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]>
c2c0555 to
ee03b50
Compare
|
jenkins test make check |


Fixes: https://tracker.ceph.com/issues/70040
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 retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e