Commit Graph

146678 Commits

Author SHA1 Message Date
Pere Diaz Bou
d95de4fa86
Merge pull request #58395 from pereman2/scrapper-replayer
test/allocsim: osd op scraper replayer

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
2024-07-04 10:49:04 +02:00
Naman Munet
a784b71abf mgr/dashboard: RGW sync policy crud operations
sync group crud ops added

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

Signed-off-by: Naman Munet <nmunet@redhat.com>
2024-07-04 12:41:26 +05:30
Ali Masarwa
5d6db362d3 RGW|BN : change endpoint for http failing tests
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
2024-07-04 10:06:26 +03:00
Guillaume Abrioux
96c7a230ef
Merge pull request #58344 from guits/fix-log-errors
qa: fix log errors for cephadm tests
2024-07-04 08:17:44 +02:00
Matt Benjamin
1a7902cc03
Merge pull request #55076 from linuxbox2/wip-rgw-cksum
rgw: implement S3 additional checksum support
2024-07-03 18:25:26 -04:00
Casey Bodley
52be40e256 cmake/os: remove WITH_ZFS option
when enabled and found, the os_zfs_objs target would reference a missing
file filestore/ZFSFileStoreBackend.cc and cmake would fail to configure

i take this to mean that WITH_ZFS was accidentally left over from
filestore's removal. drop all references to WITH_ZFS, along with the
corresponding Findzfs.cmake script

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 14:52:03 -04:00
Casey Bodley
18ab9f5f62 cmake: use BLAKE3's cmake
Added EXCLUDE_FROM_ALL to prevent gristing files in
the subdir.

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:39:27 -04:00
Daniel Gryniewicz
77f69974ef rgw_cksum: introduce attribute caching in RadosMultipartUpload
Allow MultipartUpload::complete() to have previously called
Upload::get_info() without an additional round-trip to fetch
attributes.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:39:21 -04:00
Matt Benjamin
dc46e2778e rgw_cksum: address review comments
* remove rgw_cksum_pipe state enum, not needed [Casey review]
* remove a format that just took a single string substitution
  and passed it to an iostream [Casey review]
* use boost::to_upper* [Casey review]
* remove unused RGW_ATTR_CKSUM_ALGORITHM decl [Casey review]
* negate error code values in two places [Casey review]
* split cksum digests from base type decls
* resolve comment when checksum requested but not available
* remove redundant memset
* remove junk from rgw_blake3_digest.h
* s/ldpp_dout + fmt::format/ldpp_dout_fmt/g;
* fix conditional return of parts_count
      from RGWRados::Object::prepare().  A value for parts_count should
      be returned iff a *multipart* object manifest exists.
* remove /tmp output test
* finish moving ceph_crypto headers out of rgw_cksum.h
* consume the optional in multipart_parts_count
* target_attrs can be a reference (but not const)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:39:17 -04:00
Matt Benjamin
ae4a871d3f rgw_cksum: implement POST upload checksums
* properly transform pseudo headers in PostObj
* enable cksum verify in PostObj
* match checksum headers in match_policy_vars
* fixup add POST headers to environment

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:39:11 -04:00
Matt Benjamin
6ef9a282fd rgw_cksum: fix ReadOp comment
parts_count now returns a value for parts_count whenever the
target object is a multipart upload.  this has no additional
overhead, since this can be read off the manifest

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:39:05 -04:00
Matt Benjamin
84f1e6ff35 return parts_count from read_op::prepare whenever applicable
* fix to deal with parts_count == 1 asymmetry

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:38:59 -04:00
Matt Benjamin
d3ff9c63f2 rgw_cksum: upload->get_info() fails when !cksum (why?)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:38:53 -04:00
Matt Benjamin
0b9bbcbd60 rgw_cksum: multipart upload checksums
includes commits:

* fixes init-multipart header return
* introduce checksum to SAL MultipartPart interface
* thread optional checksum through DataProcessor
* code complete multipart checksum verify
* fix formatter
* fix ckecksum format for multipart objects in GET/HEAD ops
* always return parts_count from ReadOp::prepare() if applicable
      This behavior is used when returning the checksum of a multipart
      upload object.
* tweak conditional multipart_parts_count
* add checksum output to ListMultipart
* fix nil-return from GetHeaderCksumResult
* re-arm truncated if re-entering list-parts
* complete-multipart w/list-parts
* validate supplied checksum in CompleteMultipart
* verify checksum type against initial checksum algorithm
* rgw_op: suppress more x-amz headers
* final fixes and cleanups
* remove unused t0

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:38:14 -04:00
Matt Benjamin
d616de4b37 rgw_cksum: test round-trip constructor (armored)
I.e., prove cksum == Cksum(cksum.to_armor().c_str())

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:24:23 -04:00
Casey Bodley
32753abc3a * forward pipe continuation in RGWPutObj_Cksum::process()
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:24:15 -04:00
Matt Benjamin
8ff3417193 rgw: add checksum and digest machinery
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 <tongzhiwei_yewu@cmss.chinamobile.com>.
Thank you!

Fixes: https://tracker.ceph.com/issues/42080
Fixes: https://tracker.ceph.com/issues/63951

squashed commits:
* rgw_cksum: add trival test vectors for sha-format digests
      Computed digests match those produced by sha1sum, sha256sum,
      and sha512sum utilities.
* rgw_cksum: add test vectors for blake3
      Tests the same input strings with digests validated by
      b3sum (https://crates.io/crates/b3sum).
* rgw_ckum: switch to accel crc32c
      The internal Ceph convention appears to be to omit a final
      xor where ceph_crc32c is used, but it's required for compatibility
      with AWS implementations.
* rgw_cksum: add XXH3 digest
* rgw_cksum: write class encoder for rgw::digest::Cksum
* rgw_cksum: also reverse crc32c (REBASEME)
      Mark noticed that the crc32c output was being tested against a
      byteswapped value (crc32c also needs byteswap on LE).
* rgw_cksum: add digest::Cksum serde tests
* rgw_cksum: fix main(...) linkage
      (so we run our main unit and not the one in gmock
* rgw_cksum: convenience extensions for integration with RGW/S3
* introduce rgw_cksum unique_ptr factory
* rgw_cksum: mark string transform accessors const
* rgw_cksum: fixup unittest_rgw_chksum compilation--all existing tests pass
* rgw_cksum: hook up put-object checksum workflow
* tweaks to report on content checksum mismatch
* rgw_cksum: match SDK as well as general checksum header
* make it more efficient
* initialize RGWPutObj_Cksum::digest
* rgw_cksum:  write parse_cksum_type w/const char* arg
* initialize _type correctly; doing armored wrong
* fix expected checksum header name, clean up verify
* fix output on checksum verify fail, cleanup
* introduce Cksum::to_armor();  all AWS cases pass
* oops, extra 0-byte at end of to_armor() result
* use to_armor() with decoded checksums (i.e., for all S3 presentation)
* remove unnecessary finalize() in RGWPutObj_Cksum dtor
* RGWPutObj_Cksum::Factory fixes
* fixes test_object_checksum_sha256
* choose preferred checksum algorithm header if both are present
* log verified checksums in RGWPutObj::execute at 16
* checksum not needed in policy condition
* fix checksum trailing header format
* move Blake3 to rgw_digest_blake3.h

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:21:46 -04:00
Matt Benjamin
b6d585645c common/rgw: add BLAKE3 submodule
Fast, cryptographic hash functions suitable for block checksums.
BLAKE3 is the faster, more portable successor to Blake2(b,s),
now with 4x throughput.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:19:15 -04:00
Matt Benjamin
8cf0e09a34 common: update xxHash submodule to v082
Among other things, provides XXH128 and XXH3.  Includes
compile fixes for gcc-13.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-03 14:18:35 -04:00
Adam King
95ae364325 mgr/rgw: fix setting rgw realm token in secondary site rgw spec
This was setting a field called "rgw_token" in the rgw spec
but this is not a real field in rgw specs. Instead we should
be setting "rgw_realm_token" which is what the field is
actually called.

Setting this nonexistent field causes the spec to be deleted
the first time cephadm needs to convert it from a json string
back into a python object (which happens whenever the module
restarts or the active mgr changes) which then causes all the
rgw daemons attached to the service to be removed

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

Signed-off-by: Adam King <adking@redhat.com>
2024-07-03 14:10:57 -04:00
Adam King
d2412bc869 cephadm: make cephadm compatible with jinja2 2.11.3
That version is what's currently being shipped in
RPMs on rhel9

Signed-off-by: Adam King <adking@redhat.com>
2024-07-03 14:04:19 -04:00
Casey Bodley
c46a1773e3 cmake/erasure-code/jerasure: jerasure_utils depends on legacy-option-headers
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 14:00:28 -04:00
Casey Bodley
2702ad21b7 cmake/test/objectstore: remove ObjectStoreImitator object library
just compile it as a source file in ceph_test_fragmentation_sim

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 14:00:28 -04:00
Casey Bodley
422034550c cmake/test/objectstore: store_test_fixture depends on legacy-option-headers
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 14:00:28 -04:00
Casey Bodley
3f6ff06ade cmake/mgr: mgr_cap_obj depends on legacy-option-headers
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 14:00:28 -04:00
Casey Bodley
1fb3d0722b cmake/compressor: QatAccel depends on legacy-option-headers
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 14:00:28 -04:00
Casey Bodley
fab5199c86 cmake/crush: crush_objs depends on legacy-option-headers
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 13:59:49 -04:00
Zac Dover
98938a0312 doc/rados: document manually passing search domain
Document how to manually pass the search domain to "mon_dns_srv_name" in
doc/rados/configuration/mon-lookup-dns.rst.

This commit is made in response to a request by Lander Duncan that was made on the [ceph-users] mailing list, and can be seen here: https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/F7V4CWLIYCAJ4JXI2JLNY6QPCFPR4SLA/

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
2024-07-04 03:52:55 +10:00
Ilya Dryomov
e884e3ae02
Merge pull request #58407 from nbalacha/wip-nbalacha-rbd-qa-fixes
qa/workunits/rbd: minor rbd_mirror_helpers.sh fixes

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2024-07-03 18:36:48 +02:00
Casey Bodley
bcd7b8c3ea
Merge pull request #58403 from ivancich/wip-fix-bucket-sync-thread
rgw: fix bucket sync thread waiting inordinate amount of time

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 17:13:47 +01:00
Casey Bodley
be0e8e2064
Merge pull request #58378 from YaZasnyal/fix/discard_buffer_size
rgw: DoS when QuotaExceeded

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 15:58:20 +01:00
Guillaume Abrioux
53b462764c qa: fix log errors for cephadm tests
This fixes a lot of errors induced by the log scrapper check.

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

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-07-03 16:25:49 +02:00
Casey Bodley
8a01cc23bd
Merge pull request #58119 from Suyashd999/fix-uam8
rgw_user: 'keys' is in undefined state after being moved.

Reviewed-by: Yuval Lifshitz <ylifshit@ibm.com>
Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
2024-07-03 15:08:33 +01:00
Casey Bodley
1e739f3ed8
Merge pull request #58339 from clwluvw/s3website-no-host
rgw: use s3website REST when higher priority and no host header

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 15:04:15 +01:00
Casey Bodley
9069e1a985
Merge pull request #58399 from cbodley/wip-rgw-deshard-encoding
cls/rgw: bump cls_rgw_reshard_entry decode version to match encode

Reviewed-by: Adam Emerson <aemerson@redhat.com>
2024-07-03 15:03:34 +01:00
Casey Bodley
cdc2779dae
Merge pull request #57060 from awojno-bloomberg/wip-awojno-status-header
rgw: implement x-amz-replication-status for PENDING & COMPLETED

Reviewed-by: Shilpa Jagannath <smanjara@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2024-07-03 15:02:55 +01:00
Pere Diaz Bou
7719091aef test/allocsim: trim bufferlist before sending
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-03 15:55:36 +02:00
Pere Diaz Bou
100e44dbb1 test/allocsim: worker threads, op hashed by client
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-03 12:59:20 +02:00
N Balachandran
23f962f943 qa/workunits/rbd: minor fixes
Corrected paths and added missing spaces.

Signed-off-by: N Balachandran <nibalach@redhat.com>
2024-07-03 16:16:13 +05:30
Pere Diaz Bou
6bd4b29fa1 test/allocsim: mmap threaded parser
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-03 12:21:46 +02:00
Pere Diaz Bou
2dadace1b8 test/allocsim: comment running op cout
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-03 10:52:28 +02:00
Pere Diaz Bou
0b6af743bd test/allocsim: comment parssing cout
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-03 10:36:05 +02:00
Pere Diaz Bou
9efaa18302 test/allocsim: truncate,zero,writefull replay operations
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-03 10:26:23 +02:00
Casey Bodley
b0d059640f rgw: RGWCoroutinesManager warns about blocking
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-02 16:40:50 -04:00
Casey Bodley
fdeff76d03 rgw/rados: RGWReshardWait warns about blocking
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-02 16:40:50 -04:00
Casey Bodley
5eda1d3353 rgw: config option rgw_asio_assert_yielding
enable this to assert on blocking calls that should be asynchronous
instead of just logging a warning message

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2024-07-02 16:39:39 -04:00
Casey Bodley
1272408faf
Merge pull request #57985 from thotz/add-storage-adminops-api
rgw/adminops: add option to provide storageclass adminops user apis

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
2024-07-02 20:55:25 +01:00
Casey Bodley
262ed467ae
Merge pull request #57858 from adamemerson/wip-66340
rgw/multisite: Fix use-after-move in retry logic in logbacking

Reviewed-by: Yuval Lifshitz <ylifshit@ibm.com>
Reviewed-by: Suyash Dongre <suyashd999@gmail.com>
2024-07-02 20:46:47 +01:00
Kritik Sachdeva
480253eaea mgr/rgw: Adding a retry config while calling zone_create()
Fixes https://tracker.ceph.com/issues/66750

Signed-off-by: Kritik Sachdeva <sachdevakritik.440@gmail.com>
2024-07-02 23:27:49 +05:30
J. Eric Ivancich
afdead8a17 rgw: fix bucket sync thread waiting inordinate amount of time
A signed value was read in as an unsigned value, so -1 was interpreted
as a very large value. This made the thread wait period in the bucket
sync thread inordinately long, preventing bucket sync and dynamic
resharding (unless values appropriate for debugging were set).

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
2024-07-02 13:50:27 -04:00