Skip to content

[draft] OSD Direct OOB RDMA - #73164

Open
mmgaggle wants to merge 25 commits into
ceph:mainfrom
mmgaggle:wip-kbader-s3rdma-all
Open

mmgaggle wants to merge 25 commits into
ceph:mainfrom
mmgaggle:wip-kbader-s3rdma-all

Conversation

@mmgaggle

@mmgaggle mmgaggle commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request carries the complete S3 over RDMA series in one branch. Reviewers can review and test the feature as a whole. RFC #71209 holds the design discussion. The parts can also go in one at a time, in the order of the table below.

A client with RDMA sends a normal S3 GET or PUT, plus an x-amz-rdma-token header that names a window of its memory. The gateway puts the token in the RADOS ops that it sends. For a GET, the OSDs write the object data straight into the client's window. For a PUT, the primary OSD pulls the payload out of the client's window. The object data does not go through the gateway. The client and the gateway agree on the result with the x-amz-rdma-reply header and a CRC-64/NVME or CRC-32C checksum of the bytes that moved.

The transports are libfabric (through the ofi-rma library), cuObject, and an RC service in the gateway for clients without libfabric. The feature is off by default, because oob_client_transports is empty by default. The libfabric transport also needs the build option WITH_OOB_OFI, which is off by default. The RC service builds with WITH_RDMA_RC, and WITH_RDMA turns that option on by default. Stock clients never send a delivery descriptor. An OSD without a transport declines each delivery, and the client then uses the normal path.

Parts

Part Last commit What it adds
#70458 025cb44b927 Mark Kogan's experimental cuObject S3 RDMA server, the 206 reply to a ranged GET, and the optional cuObject build.
P0 062c5548be3 Eight fixes. Seven apply to main alone, and P0.7 needs P0.3. See the list below.
P1 8bdd50b29a1 CRC-64/NVME with ISA-L, and the combination of CRCs.
P2 172bceb4d52 The common out-of-band layer: configuration, the locked memory arena, and the token parsers.
P3 3a115c2f02e The ofi-rma submodule and the WITH_OOB_OFI build option, off by default.
P4 6435e34989b Delivery descriptors on MOSDOp and results on MOSDOpReply, with the librados and Objecter calls and the pool options.
P5 ee31c1164d4 The OSD writes a read's data into the client's window.
P6 5ab325f28d7 The primary OSD pulls a write's payload out of the client's window.
P7 87940807745 The gateway: OSD-direct GET and PUT, checksum headers, window fences, and rate limits.
P8 1479944bd9b BlueStore reads straight into the out-of-band arena, with no copy.
P9 7f33e7aaaf6 The RC service for clients without libfabric.
P10 1971d0c3f82 Teuthology suites, tasks and workunits.
cephadm 0e0be3200c2 An oob section in the RGW and OSD specs: RDMA devices, memlock and raw sockets, with the deployment doc.

Each P0 fix also has a pull request of its own, on main:

  1. blk/spdk: return NVMe I/O errors and do not use a freed IOContext #73172: blk/spdk: return NVMe I/O errors and do not use a freed IOContext
  2. test/osd: build MockPeeringListener.cc into pg_backend_test_fixture #73173: test/osd: build MockPeeringListener.cc into pg_backend_test_fixture
  3. osd: free the stack of an EC coroutine op and keep its sync reads in it #73193: osd: free the stack of an EC coroutine op and keep its sync reads in it
  4. osd: repair an EC shard whose read failed with a media error #73175: osd: repair an EC shard whose read failed with a media error, with the new option osd_ec_repair_on_read
  5. osd: count and log the EC direct reads that bounce to the primary #73176: osd: count and log the EC direct reads that bounce to the primary
  6. osd: do not answer an op twice when a nested read goes to repair #73177: osd: do not answer an op twice when a nested read goes to repair
  7. osd: give the ops of a nested do_osd_ops() call finishers of their own #73178: osd: give the ops of a nested do_osd_ops() call finishers of their own, on top of osd: free the stack of an EC coroutine op and keep its sync reads in it #73193
  8. osd: wait for the last commits of the PGs before the op threads stop #73179: osd: wait for the last commits of the PGs before the op threads stop

doc/radosgw/s3-rdma.rst describes the design, the deployment and the operation. The cephadm docs, pools.rst, health-checks.rst and PendingReleaseNotes have the other changes.

Testing

On October 27, I rebased the branch onto main 169a0fb3a86. The tests ran on Fedora with WITH_OOB_OFI on. On the rebased branch, the results are as follows:

  • 32 test binaries pass with 1841 tests. These include unittest_backend_basics (876), unittest_ecfailover_with_peering (234), unittest_ofi_rma (61), unittest_rgw_rdma_rc_wire (39) and ceph_test_objectstore. Main disabled two parameterized tests of unittest_backend_basics in 7f7144a1b94 (tracker 78465), so that binary runs 192 fewer tests than before the rebase.
  • The standalone tests osd-oob-async.sh, osd-oob-resend.sh, osd-oob-copies.sh, test-erasure-eio.sh and osd-pool-create.sh pass.
  • unittest_rgw_rdma_rc_session (19) needs an RDMA device with an IPv4 GID. It ran on an Intel E810 with irdma.
  • The eight P0 fixes on main, without the rest of the series, build and pass their tests. test-erasure-eio.sh also passes with only P0.5 on main, and with only P0.6 on main. The librados test of P0.7 passes with P0.3 and P0.7 on main.
  • The cephadm (545), mgr/cephadm (1755) and python-common (543) unit tests pass.

After these tests, I replaced the 3 commits of #70458 with their current versions. They change only text: docs, option descriptions and build messages. No ceph-ci build of the rebased branch exists yet.

Before the rebase, the versions of the series from October 19 and 20 also passed these tests:

  • Each of P5 to P10 built and passed its unit tests and standalone tests at its own commit.
  • ceph-ci built the series on all 8 distribution flavors: CentOS Stream 9 and Rocky 10 (default and debug), and Ubuntu 22.04, 24.04 (default and debug) and 26.04. That build had three CI-only commits that are not in this branch. One turns on WITH_OOB_OFI in ceph.spec.in, and two work around the Ubuntu 24.04 debug link failure of main (see below).
  • A local cephadm cluster with 3 OSDs and 1 gateway on an E810 deployed from the ceph-ci image with the oob section. elbencho moved objects from 4 KiB to 16 MiB over verbs, and checked every byte. A change to the spec redeployed the daemons with the new limits. This test found a race in the OSD redeploy of cephadm on main (tracker 81929). Its fix is a separate pull request.
  • The vstart_chaos campaigns ran on EC 2+1 pools, legacy and optimized, with out-of-band writes. Each stop that they found also happens on main. The trackers are 81921 and 81922.

No teuthology suite ran in the lab yet.

Notes for reviewers

Checklist

  • Tracker (select at least one)
    • 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
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: osd_oob_cutoff_policy (osd.yaml.in)
+ added: osd_ofi_inject_cutoff_delay (osd.yaml.in)
+ added: osd_oob_transfer_queue_bytes (osd.yaml.in)
+ added: osd_debug_oob_delay_post_ms (osd.yaml.in)
+ added: osd_oob_transfer_threads (osd.yaml.in)
+ added: osd_ec_repair_on_read (osd.yaml.in)
+ added: osd_ofi_inject_cutoff_failure (osd.yaml.in)
+ added: osd_oob_cuobj_transfer_threads (osd.yaml.in)
+ added: osd_oob_transfer_thread_timeout (osd.yaml.in)
+ added: osd_oob_direct_read (osd.yaml.in)
+ added: osd_debug_oob_delay_done_ms (osd.yaml.in)
+ added: osd_oob_cutoff_late_tolerance (osd.yaml.in)
+ added: osd_oob_transfer_queue_max (osd.yaml.in)
+ added: oob_memory (global.yaml.in)
+ added: oob_network_interface (global.yaml.in)
+ added: oob_keep_net_raw (global.yaml.in)
+ added: cuobj_dc_key (global.yaml.in)
+ added: oob_cluster_transport (global.yaml.in)
+ added: oob_addr (global.yaml.in)
+ added: oob_client_transports (global.yaml.in)
+ added: oob_network (global.yaml.in)
+ added: rgw_rdma_rc_max_sessions_per_user (rgw.yaml.in)
+ added: rgw_rdma_rc_path_mtu (rgw.yaml.in)
+ added: rgw_rdma_rc_exec_timeout_ms (rgw.yaml.in)
+ added: rgw_rdma_checksum (rgw.yaml.in)
+ added: rgw_rdma_rc_max_bytes_per_user (rgw.yaml.in)
+ added: rgw_rdma_rc_max_sessions (rgw.yaml.in)
+ added: rgw_cuobj_rdma_ip (rgw.yaml.in)
+ added: rgw_rdma_rc_prepare_timeout_ms (rgw.yaml.in)
+ added: rgw_cuobj_rdma_port (rgw.yaml.in)
+ added: rgw_cuobj_enabled (rgw.yaml.in)
+ added: rgw_cuobj_log_level (rgw.yaml.in)
+ added: rgw_cuobj_buffer_size (rgw.yaml.in)
+ added: rgw_rdma_osd_direct (rgw.yaml.in)
+ added: rgw_rdma_rc_dc_relay (rgw.yaml.in)
+ added: rgw_rdma_rc_trust_loopback (rgw.yaml.in)
+ added: rgw_cuobj_num_dcis (rgw.yaml.in)
+ added: rgw_rdma_rc_send_depth (rgw.yaml.in)
+ added: rgw_rdma_token_allow_anonymous (rgw.yaml.in)
+ added: rgw_cuobj_buffer_count (rgw.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@github-actions

Copy link
Copy Markdown

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

mkogan1 and others added 5 commits October 27, 2026 22:16
Integrate NVIDIA cuObject library for out-of-band RDMA data transfer
on S3 PUT and GET operations. When enabled, object data bypasses TCP
and transfers directly via RDMA between client and server memory,
while the S3 control plane (auth, headers, metadata) stays on HTTP.

Key components:
- RGWCuObjServer singleton managing cuObjServer lifecycle, a pool of
  pre-registered RDMA buffers, and per-thread channel IDs
- PUT path: RDMA_READ from client into a registered buffer, then feed
  through the existing filter chain (checksums, compression, encryption)
- GET path: collect filtered data into a registered buffer and complete
  the RDMA_WRITE to the client before sending HTTP success
- RDMA bytes included in beast access log and directional ops-log accounting

The integration is experimental and disabled by default at build time
and runtime.

Enabled via CMake flag WITH_RADOSGW_CUOBJ and runtime configuration
rgw_cuobj_enabled, rgw_cuobj_rdma_ip, and rgw_cuobj_rdma_port. Document
dependencies, deployment, protocol, per-transfer buffer limits, memory
sizing, and all seven options in the RGW S3 RDMA guide.

Add hardware-free coverage for descriptor parsing, concurrent buffer
ownership, GET/PUT completion and error paths, ranges, HEAD, and accounting.

Signed-off-by: Mark Kogan <[email protected]>
Assisted-by: OpenAI Codex: GPT-6
When a GET's data went out of band, the gateway always sent
x-amz-rdma-reply: 200, also for a range request that it answered with HTTP
206. A client that checks that the two agree, as NIXL's OBJ plugin does,
then rejects every ranged GET.

Return x-amz-rdma-reply: 206 for ranged GETs answered with HTTP 206,
and retain 200 for ordinary GETs and custom HTTP responses.

Adapt the fix to the cuObject implementation and its s3rdma.rst guide.
Check the RDMA reply header in the existing full-object, ranged, and
empty-object GET tests.

Validation: radosgw and all four cuObject test executables build;
all 78 cuObject tests pass.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
(cherry picked from commit 29c3729)
…ner builds

Add a disabled-by-default experimental cuobj RPM conditional and a
--with-cuobj option to build-with-container.py to install the cuObject
server development package and enable the WITH_RADOSGW_CUOBJ CMake option.

Configure NVIDIA repositories for EL9/EL10 and enable RHEL build
repositories alongside EPEL and Ceph's EL10 extras.

Use install-deps.sh for the shared NVIDIA repository setup. Enable it
for native dependency installation with:

    env WITH_RADOSGW_CUOBJ=ON ./install-deps.sh

Add --no-selinux-label for source trees containing files that cannot be relabeled.

Document cuObject container builds on CentOS Stream, Rocky, AlmaLinux and
subscribed RHEL. Fedora is supported by the general container build script,
but is not a target for the automatic cuObject setup.

Signed-off-by: Mark Kogan <[email protected]>
Assisted-by: OpenAI Codex: GPT-6
io_complete asserted that every NVMe completion succeeded, so a media
error crashed the OSD. Now read() returns -EIO, and an aio fails an
IOContext that allows EIO, as in KernelDevice. The last aio callback can
free the IOContext, but a write released its buffers after it and
_aio_handle() read num_running after it. Now neither does.

Fixes: https://tracker.ceph.com/issues/82191
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
OsdTestFixture owns a MockPeeringListener, and PGBackendTestFixture.cc
destroys it. Only ec_peering_test_fixture built MockPeeringListener.cc,
so unittest_backend_basics did not link (no vtable for
MockPeeringListener). Build it in pg_backend_test_fixture, which every
user of ec_peering_test_fixture also links.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
An op that ended without a yield dropped the last reference to its
coroutine inside the coroutine, so its 128 KiB stack leaked. Now
resume_coroutine() holds a reference across the resume. The op also kept
handles into the freed stack, and a later sync read yielded on them. Now
the coroutine clears them and waits for the op's async reads itself,
also when an op before the CALL started them before any sync read.

Fixes: https://tracker.ceph.com/issues/82192
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
The EC primary decoded a client read around a shard that failed with
EIO and only logged a warning. Now a clean PG marks the object missing
on that shard and recovers it (osd_ec_repair_on_read, ec_read_repair).
It is on by default, as a read repair in a replicated pool is, and only
a PG with k+1 shards that the read did not find damaged repairs. A
shard that finds a corrupt object info now sends no data with its EIO,
because the primary asserts on an object with an error and data.

Fixes: https://tracker.ceph.com/issues/82193
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
Since 0f17b4c (ceph#72292), an EC direct read that fails with EIO on
its shard goes back to the client with EAGAIN. The client then sends
the read to the primary, which decodes the data from the other shards.
Only a debug log line shows such a bounce, so a damaged shard that
clients read again and again stays hidden.

Now the shard counts each bounce in the new perf counter
ec_direct_read_redirect_eio, and writes it to the OSD log. The cluster
log gets the 1st, 2nd, 4th, 8th and later bounces of each PG. If fiemap
fails with EIO, a sparse direct read also bounces. A sparse direct read
also skips the whole-object digest check, because the digest does not
cover the chunks of one shard.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
rep_repair_primary_object() answers EAGAIN to a failed read on a
replica or on an EC shard, and on the primary makes the op wait for the
repair. A read in a CALL does not always return the EAGAIN, so
execute_ctx() answered the op again. Now the replica or the shard marks
its reply as sent, and execute_ctx() does not answer an op that has its
reply. On the primary, a waiting op drops the result of its run
(parked_for_repair).

Fixes: https://tracker.ceph.com/issues/82194
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
do_osd_ops() numbered the ops of a nested call, such as the reads of a
CALL's method, from 0, as for the request. On an optimized EC pool the
nested read of a CALL after a READ or a CHECKSUM ran the finisher of
the request's op 0, and the method got no data. A nested call now keeps
its finishers for the op that made it, and gives the caller's loop its
op number back.

Fixes: https://tracker.ceph.com/issues/82195
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
A slow shutdown (osd_fast_shutdown=false) could leave a PG referenced
when OSD::shutdown() detached it ("has ref count of 2"), and
BlueStore::umount() then failed its assert on the reference count of
the PG's collection.

The map that marks the stopping OSD down starts a new interval in each
PG just as the shutdown begins. The on-commit callback of that peering
transaction holds a FlushState, and the FlushState holds the PG.
PG::shutdown() waits until the transactions of the PG are submitted,
not until they commit. The store queues the on-commit callbacks of a
PG to the context queue of its shard, where the op threads of a
stopping OSD delete them. When the commit came after the op threads
had stopped, its callback stayed in the queue and kept the PG, and the
PG's collection, past the detach of the PG and the umount of the store.

Now OSD::shutdown() waits until the transactions of each PG have
committed, after it shut the PGs down and while the op threads still
run. The waiter signals when it is released, because the op threads
delete it instead of running it. The wait takes as long as the last
commits, a few milliseconds.

Fixes: https://tracker.ceph.com/issues/82196
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
ceph::crc64nvme() computes CRC-64/NVME with ISA-L's x86-64 folding
kernels (PCLMUL, and AVX-512 VPCLMUL), which the crc32 object library
assembles as it does for CRC-32C, and with madler's tables elsewhere.
crc64nvme_combine() joins the CRCs of two runs, and crc64nvme_crc32c()
computes a CRC-32C in the same walk. rgw's CRC-64/NVME digest uses
ceph::crc64nvme(). The vendored madler and spdk CRC sources move from
rgw to common, and spdk's routine stays a reference for the tests.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
oob_config finds a daemon's out-of-band address, interface, RDMA
device and GID from oob_network, oob_network_interface and oob_addr.
It parses oob_client_transports and oob_cluster_transport, the
transports that a daemon serves to clients and uses inside the
cluster. oob_arena is one region of locked memory per daemon
(oob_memory) that the transports register once. rdma_token parses and
checks the token of each transport.

No daemon uses this layer yet. The OSD and the gateway use it in later
commits.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
ofi-rma (src/ofi-rma, MIT) moves data out of band into memory that a
peer lends, over libfabric. WITH_OOB_OFI builds it and checks for
libfabric 1.20 or later. Packaging gets the oob_ofi bcond and the
pkg.ceph.oob-ofi build profile. When WITH_OOB_OFI asks for it,
install-deps.sh, run-make.sh and build-with-container.py
(--with-oob-ofi) turn it on.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
…reads and writes

A client can ask the OSDs to move an op's data out of band. MOSDOp
carries a delivery descriptor for each op as an optional suffix, which
stock clients never send. MOSDOpReply carries an out-of-band result
for each op. librados and the Objecter expose them, and SplitOp fans
the descriptors out to its sub-reads. common/rdma_token gets the
descriptor and result types and the helpers that fold their CRC
ranges, and ceph-dencoder knows the types.

The pools get rdma_delivery_lease and rdma_delivery_drain, and the
monitor checks their ranges. Only a development or downstream build
stores a value outside the ranges. The OSD clamps such a value, and
the POOL_RDMA_DELIVERY_OUT_OF_RANGE health warning reports it. An OSD
rejects an MOSDOp version newer than it can read.

The OSD has no transport yet. It answers each such op inline, and
declines the delivery in the reply. A reply that redirects a request to
the base pool of a cache tier declines it too. The OSD refuses a write
whose payload is in client memory with EOPNOTSUPP. The crimson OSD
declines in each of its replies, and refuses such writes as well.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
The OSD writes a read's data into the client's window instead of the
reply. It gets executors over libfabric (OSDOfi) and cuObject
(OSDCuObj), placement plans, and a pool of transfer threads
(osd_oob_transfer_threads). Each transfer counts its bounds from the
receipt of its op. Replicated reads push from the primary. EC reads
push from each shard (balanced reads), or gather into windows of the
primary (oob_cluster_transport).

The OSD reports its transports with "ofi status" and
dump_oob_transfers, and the mon raises the health checks of a failed
cut-off or a lost transport. The cuObject executor takes its key from
cuobj_dc_key, and the DC target hands out descriptors in the cuObject
form. OSDCuObj::run_plan() also moves data the other way, which the
pulled writes of the next commit use.

A read whose push runs on a transfer thread lets go of its object's
lock before its reply leaves. Until that reply leaves, a client op that
can change the object waits in the fence of the object
(ceph::osd::oob::read_fences). The ops on the object behind it wait
too. The thread that sends the reply then queues PGOobReadKick, and the
PG runs the waiting ops again. So a client that sends the read again
after a split or a primary change gets the object as it was before its
later ops. A PG that stays primary keeps its fences through an interval
change. The standalone test osd-oob-resend.sh covers a split and a
primary change.

An OSD that runs the uet provider keeps CAP_NET_RAW across --setuser,
for the endpoint that its executor opens. global_init() keeps it with
the caps helpers of oob_config, and ceph-osd asks the extblkdev trim to
keep it with ceph::extblkdev::keep_permitted_cap(). The OSD switches
before the monitor configuration arrives, so it sees uet only in
ceph.conf, the environment or the command line. If only the monitor
configuration selects uet, oob_keep_net_raw makes it keep CAP_NET_RAW.
ceph-osd turns off the registration cache monitor of libfabric, so that
a released window gets a new key.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
A write whose descriptor names client memory gets its payload pulled
by the primary. This adds pull sets and a hold for each head at the top
of do_op. Pulls run on the transfer threads. The OSD answers resent
pulls, and handles a primary change during a pull. The executors get
their pull API, and ceph_test_osd_oob_read gets a put mode.

A pulled write counts its bounds from receipt. If its pull cannot
start before the pool's delivery lease runs out, it pulls nothing and
fails with EOPNOTSUPP. The client then sends the payload inline. A
request with pulled writes that is not flagged as a write fails with
EINVAL. An EC pool takes only appends as pulled writes, and refuses
others with EINVAL. Before a pull, the OSD checks osd_max_write_size
(EFBIG) and a full pool (ENOSPC), with write_snapc() and
write_to_full_pool(), which execute_ctx() now shares. The pulled bytes
count toward the client throttle and the cost of the op.

The Objecter asks for the pull records of a pulled write. The primary
keeps them in the PG log, so that a resent write gets the answer of
its first attempt. 'ceph pg query' shows the pull holds of a PG
(oob_pull_holds). The S3 over RDMA guide, which comes with the
gateway, documents this behavior.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
The gateway forwards an x-amz-rdma-token to the OSDs, so that a GET's
data and a PUT's payload move between the OSDs and client memory. It
adds the checksum headers, the fence of a client window and rate
limits for out-of-band bytes. The SAL filters pass the RDMA fields
through, and the S3 over RDMA guide comes with it. The staged GET code
of rgw_rest_s3.cc becomes the modes of RGWGetObj.

The cuObject server of the gateway changes. It stages in the shared
oob_memory arena. It takes its address from oob_network or public_addr
(ceph::oob::public_ip()), and its key from cuobj_dc_key. When
oob_client_transports names cuobj, it starts after the frontends. It
no longer reads rgw_cuobj_enabled, rgw_cuobj_rdma_ip,
rgw_cuobj_rdma_port, rgw_cuobj_buffer_size, rgw_cuobj_buffer_count or
rgw_cuobj_num_dcis. Those options and doc/radosgw/s3rdma.rst stay as
they are for now, and their future is an open question.

With rgw_rdma_token_allow_anonymous false, the default, the gateway
ignores the token of an anonymous request. An OSD-direct PUT stores an
ETag of the multipart form, so the multisite ETag verifier skips such
an object. ceph_test_rgw_ofi_get and ceph_test_rgw_ofi_put are S3
clients over libfabric, for tests against a cluster.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
ObjectStore::read_into() and KernelDevice::aio_read_into() read from
the device into the caller's memory. With osd_oob_direct_read, the OSD
reads replicated objects and EC shards into its arena. The libfabric
executor then writes from the arena with no copy (write_staged, with
the plans_staged and bytes_staged stats). An EC primary with
oob_cluster_transport reads its own shard into the arena, and takes
the pushed shards into arena buffers with one copy. The arena gets
shared buffers for these reads.

BlueStore::readv() now shares the steps of read() around the device
read. So a scrub readv skips the clean cache, and checksum retries
raise BLUESTORE_SPURIOUS_READ_ERRORS. Buffers that skip_cache() names
are not cached, and the frag sampling and latency logging move.
StoreTest.ReadvAsRead checks it. BlueStore counts
read_into_direct_bytes and read_into_copied_bytes.

libceph_test_copycount, in ceph-test, counts the copies of a daemon
through LD_PRELOAD. qa/standalone/osd/osd-oob-copies.sh checks the
copy budget of each read and of a pulled write. The test client reads
from an offset (--offset), for the reads into the arena at the
alignment of their offset.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
An RC (hipobj-rc-v2) service in the gateway, for clients without
libfabric: sessions, the wire encoding and the REST handlers.
oob_client_transports takes rc. For a GET, the OSDs write the stripes
into a relay window of the gateway, and the gateway forwards them to
the client. These are the RELAY and RELAY_STAGED modes of RGWGetObj.
For a PUT, the client writes the object into a session buffer, and the
gateway stores it through the normal PUT path. Per-owner session and
byte limits bound what one user takes. The rate limits charge
out-of-band bytes by direction, because an RC GET is a POST.

The OSDs reach a relay window over libfabric. When rgw_rdma_rc_dc_relay
is on, they reach it through a cuObject DC target instead (mlx5 only).
A gateway with uet relay windows keeps CAP_NET_RAW across --setuser
until the endpoint is open (rgw_keeps_net_raw(), drop_net_raw()).
radosgw turns off the registration cache monitor of libfabric, so that
a closed relay window loses its key.

WITH_RDMA_RC builds it, on by default where RGW and the RDMA messenger
are built. The S3 over RDMA guide gets the RC sections.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
Teuthology suites for S3 over RDMA: rgw/s3-oob (16 jobs: transport
tcp or verbs on soft-RoCE with or without cluster legs, a replicated or
EC pool, and primary or balanced reads), rgw/s3-oob-thrash (18 jobs:
soak and s3tests while OSDs and gateways are killed, with delivery and
network faults), rgw/s3-oob-uet-ernic (12 jobs over the uet provider
on rocm-ernic VMs) and rgw/s3-oob-verbs-ernic (3 jobs over the verbs
provider on the same VMs, through the ionic RDMA driver).
rgw/s3-oob-standalone runs the standalone OOB suites with
CEPH_OOB_REQUIRED=1, so that they fail instead of skipping on a build
without a transport.

Two suites run on bare-metal nodes with an RDMA NIC, such as mako
nodes. rgw/s3-oob-rnic (8 jobs) runs the jobs of rgw/s3-oob over verbs
on the NIC of each host, with rdma_rxe hardware: true, which adds no
soft-RoCE. rgw/s3-oob-uet-host (24 jobs) runs the uet workloads on
five nodes, over the provider's software core, over RUDI or RUD. A job
has no fault, or the provider's packet hold, which makes UET packets
arrive late. The workunit run-s3-oob-elbencho.sh builds ofi-rma and
elbencho, and runs elbencho --s3ofi as a load generator. Each job of
rgw/s3-oob-rnic runs it, and so do 6 jobs of rgw/s3-oob-uet-host.

New tasks: rdma_rxe, oob_check, rgw_thrash, ernic and uet_host, chance_sigstop in
the OSD thrasher, and loss, duplicate, reorder and corrupt in netem.
Workunits move objects out of band with the test clients and the new
soak client ceph_test_rgw_ofi_soak, and check every byte and the
OSDs' counters. If a GET falls back for a reason other than a token
that is too small, the soak fails in strict mode.

The ernic suites need the ernic machine type and its teuthology
provisioner, which is not upstream yet. The uet suite also needs
unpublished libuet_ernic refs. With provider: verbs, the ernic task
builds nothing and checks the verbs provider on each NIC. The ceph and rgw tasks take daemon_env and env. netem imports
gevent.event for its link toggle, takes dst_client as a one-role list,
and tears down the interface that it resolved.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
The oob section of an RGW or OSD service specification gives the
containers what out-of-band (S3 over RDMA) transports need:

  oob:
    rdma_devices: [mlx5_0] | all
    memlock: 4G | unlimited
    raw_sockets: true | false

OOBSpec validates the section. Device names are the names that
ibv_devices lists, not paths. memlock defaults to the daemon's
oob_memory plus 1 GiB, for the provider's own buffers. container_config()
gives the config that the mgr sends with a deployment. The module is in
ceph.cephadm, so that the cephadm binary and the mgr share it.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
If the deployment of an RGW or an OSD has an oob section, cephadm adds
these arguments to the container:

* --ulimit=memlock=N:N, from the config's memlock.
* --device for the uverbs node of each named RDMA device, found by its
  name in /sys/class/infiniband_verbs/*/ibdev, and for
  /dev/infiniband/rdma_cm. If a named device or rdma_cm is missing,
  the deployment fails. "all" names every device on the host.
* If raw_sockets is true, --cap-add=NET_RAW.

The OSD's container is privileged, so it gets only the memlock limit.
With raw_sockets, cephadm also starts the OSD with
--oob-keep-net-raw=true, because the OSD switches to the ceph user
before it reads the monitor's options. The descriptions of oob_memory and
oob_keep_net_raw now point at the oob section.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
RgwService and OSDService send the oob section, resolved, with each
deployment.
The default memlock follows the daemon's oob_memory.

The oob config sets container arguments, so only a redeploy applies a
change. Both services add an oob: dependency, which is a hash of the
oob config of the service's section. When it changes, they redeploy.
It changes with the oob section and with the oob_memory that the
default memlock follows. serve still checks ok-to-stop before it
redeploys an OSD.

Also test that a changed extra_container_args redeploys a daemon
without removing the service. cephadm has done this since Quincy, but
no test covered it.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
Replace the extra_container_args recipe in "Deploying with cephadm"
with the oob section: its three fields, what an OSD and a gateway need,
and when cephadm redeploys. An OSD no longer needs the uet transport as
an entrypoint argument, which overrode the monitor configuration.

Add an SELinux section. cephadm starts each daemon with --ipc=host,
and Podman does not confine such a container (spc_t), so the gateway
needs no policy change. A container that you start yourself as root,
without --ipc=host, is confined (container_t). It still opens the RDMA
devices that it gets, because Podman gives each new device node the
container's label. A rootless container sees the host's
infiniband_device_t nodes and cannot open them.

The locked memory limit is now oob_memory plus 1 GiB instead of
unlimited. Point the cephadm RGW and OSD service pages at the section.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

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

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