Remove persisted sync-stat omap entries when a peer is removed or
mirroring is disabled for a filesystem, since those peer UUIDs are not
reused. Preserve omap on internal blocklist/failure restarts so sync
can resume where it left off.
Also update the relevant documentation
Fixes: https://tracker.ceph.com/issues/78464
Signed-off-by: Kotresh HR <khiremat@redhat.com>
smb: support altpaths for updating non-AD users/groups live while a cluster is running
Reviewed-by: Anoop C S <anoopcs@cryptolab.net>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
* refs/pull/70212/head:
qa/cephfs-mirror: Fix tests for ISO sync_time_stamp
doc/cephfs-mirroring: document ISO-8601 sync timestamps
cephfs_mirror: format sync timestamps as ISO-8601 local time
tools/cephfs-mirror: report epoch time in last snap sync time
Reviewed-by: Karthik U S <karthik.u.s1@ibm.com>
when demoting them
It is possible that, when we do demote_region, the target region has
already been removed from the lba tree, for example, a temp recovering
object might have already been renamed to the real one, which means all
lba mappings within its original region have been moved away.
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
to cache
This is to avoid an under-promotion extent from being added back to and
evicted from the cache again before the promotion ends.
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
This is necessary for the promote transaction to find the transactions
that are retiring the extents promoted
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
rewrite transactions
So we need to merge the extents promoted/demoted with their counterparts
in client transactions, just like trim/cleaner transaction do.
The difference between demote/promote transactions and trim/cleaner
transactions is that the former also involves remapping extents while the
latter only involves rewriting and mutating extents.
With the logical bucket cache in place, all rewrite transactions need to
handle shadow extents carafully, too.
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
In scatter_allocation, an extent is split into several
small ones, and the last allocation is supposed to fail,
in which case, the small extents that belong to the same
allocation wouldn't be attached to the parent lba leaf
node. Sumitting the transaction would trigger assertions,
and is not consistent with the behavior of nornal crimson
OSDs.
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
read/write transactions
All client accessed extents are to be tracked by logical bucket cache
before eviction
Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
Write extents larger than some threshold to the cold tier directly
Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
python-common/smb: work around socket path length limits for grpc lib
Reviewed-by: Anoop C S <anoopcs@cryptolab.net>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Admin role:
- show confirmation modal that pool deletion is disabled
- allow enabling pool deletion
- fix pool deletion text
Pool mgr role
- show a modal that pool deletion is disabled
Signed-off-by: Afreen Misbah <afreen@ibm.com>
This is because, even for LRU caches, extents still have pin states,
although it's only Fresh. What's more, in the logical bucket cache
world, extents in both LRU and 2Q caches may be in the
Fresh/PendingPromote/Promoting state.
Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
Switch the trigger from `pull_request` to `pull_request_target` so that
the workflow definition on `main` is evaluated for PRs targeting active
release branches (main, umbrella, tentacle, squid). This allows the check
to run cleanly across release branches without requiring workflow file
backports to each branch.
Additionally:
- Update `src/script/verify-qa` to accept an optional target directory argument ($1).
- Run the trusted `verify-qa` script from `main` against the checked-out PR directory (`./pull_request`).
The concern of exfiltrating secrets is important but not relevant here:
we're not using the secrets in the definition and we explicitly
downgrade the github token to `read` permission.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Switch the trigger from `pull_request` to `pull_request_target` so that
the workflow definition on `main` is evaluated for PRs targeting active
release branches (main, umbrella, tentacle, squid). This allows the check
to run cleanly across release branches without requiring workflow file
backports to each branch.
While this workflow passes `github.token`, the token permissions are
strictly restricted to read-only (`contents: read` and `pull-requests: read`).
Because no PR code is checked out or executed, using `pull_request_target`
presents zero security risk here.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
The grpc library (at least the version on centos/rocky 10) has a limit
of 107 characters. Even a fairly short host name is going to be close
to this limit due to the UUID and service name in the path.
Because the tool doesn't do much else and it is safe, the workaround is
to chdir to into the parent dir of the socket and only pass the relative
path name of socket.
Fixes: https://tracker.ceph.com/issues/78857
Signed-off-by: John Mulligan <jmulligan@redhat.com>
PRs carrying these GitHub labels were silently dropped from both the
QA tracker's PR "Labels" column and the Redmine ticket's tag_list,
since SUPPORTED_QA_TAGS is a fixed whitelist and these were never
added to it despite being real, actively-used component/category
labels (e.g. ceph/ceph#70661, #70658 for crimson).
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
In order to update users (and groups) live without AD support we need
the configwatch sidecar to be configured for split (altfiles) nsswitch.
The capability to configure configwatch for nsswitch was added to
sambacc under a special mode of the run subcommand.
Switch to starting the confgwatch sidecar using the run subcommand and
configuring the appropriate user and nsswitch setup options.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Update environment for smb containers to specify arguments that sambacc
will use to configure the containers for a split configuration for
users (passwd) and group files. The writable copy will be store in
the samba state dir (/var/lib/samba in the container) and be shared
across the primary and sidecar containers so that configwatch can
pull new users and groups lists from ceph and apply them live.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Calling `list_images()` on a non-existent group falsely succeeded and
returned an empty iterator.This happened because `Group<I>::image_list`
ignored the negative error code returned by `group_image_list`, allowing
execution to proceed blindly. Furthermore, the C API `rbd_group_image_list`
intercepted `-ENOENT` and forced a success (0) return value.
Similarly other public C APIs `rbd_snap_list` and `rbd_group_snap_list`
also intercepts -ENOENT and forces a success (0) return value which
is incorrect.
Fix these behavior by:
- Propagating errors properly inside `Group<I>::image_list`.
- Removing the incorrect `-ENOENT` masking in `rbd_group_image_list`,
`rbd_snap_list`, rbd_group_snap_list`
Now `list_images()` consistently raise an `ObjectNotFound` error when
invoked on a non-existent group and public C APIs propagate ENOENT
without masking it into 0.
Also Extended the `TestGroups` test fixture with `self.dne_group` to
validate the expected error paths across all relevant APIs.
Fixes: https://tracker.ceph.com/issues/78108
Signed-off-by: VinayBhaskar-V <vvarada@redhat.com>
Use ref instead of external link definitions for intra-docs links.
Add labels if necessary in files within the install/ directory. Use
existing labels for links outside the install/ directory but do not add
new labels outside of the install/ directory.
Signed-off-by: Ville Ojamo <git2233+ceph@ojamo.eu>
Substitutions were not enabled on a prompt directive that tried to use
the stable-release substitution so the substitution string was rendered
verbatim.
Signed-off-by: Ville Ojamo <git2233+ceph@ojamo.eu>
When editing services such as oauth2-proxy, backend fields like scope
arrive as a single string. Spreading that string into the list turned
each character into its own row. Normalize string values to one item.
Fixes: https://tracker.ceph.com/issues/78808
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@ibm.com>
CherryPy's serve_file() uses Python's mimetypes module which returns
text/javascript for .js files (RFC 9239), but the gzip config only
listed application/javascript. This meant the main Angular bundle
was being served uncompressed. With Cheroot write timeouts,
the uncompressed transfer times out over slower networks, causing
ERR_CONTENT_LENGTH_MISMATCH in the browser.
Signed-off-by: Afreen Misbah <afreen@ibm.com>
crimson/osd/pg_recovery: call on_global_recover on replica-recover-deleted objects only when it's not missing on the primary too
Reviewed-by: Kefu Chai <k.chai@proxmox.com>
* refs/pull/70574/head:
.github/workflows: bump checkout action version
.github/workflows/qa-symlink: sparse checkout verify-qa
.github/workflows/qa-symlink: run only for active branches
Reviewed-by: Joseph Mundackal <jmundackal@bloomberg.net>
Add documentation link in Learn more column for every alert in the
active alerts list table
Fixes: https://tracker-origin.ceph.com/issues/78747
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
The updated seastar deprecates the global smp::count and smp::all_cpus() in
favour of the per-instance smp::shard_count() and smp::all_shards(). Under the
CI -Werror build these deprecation warnings are fatal.
Replace the uses with the reactor-local free functions
seastar::this_smp_shard_count() and seastar::this_smp_all_shards(), which read
the current smp instance's shard count and shard-id range. crimson runs a
single smp instance and every migrated site executes on a reactor thread (the
alienstore worker threads do not touch these), so the behaviour is unchanged.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
At SEASTAR_API_LEVEL >= 9 seastar dropped output_stream::write(net::packet) in
favour of write(std::span<temporary_buffer<char>>). Convert Socket's writes to
the span form, writing the packet's released fragments and keeping them alive
across the write with do_with, then raise Seastar_API_LEVEL from 6 to 10 to
match the updated seastar. The span write overloads are unconditional, so the
Socket change is valid at every API level.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
Update src/seastar to ceph-umbrella-25.05.0-1074-gcced0236, which is
scylladb/seastar master (fd71a5b4c7) with the ceph patches reapplied,
and adapt crimson to the future API changes the bump brings in:
- interruptible_future.h: seastar split its single ready_future_marker into
set_ready_future_marker and set_from_tuple_ready_future_marker; route
futurize::from_tuple through the matching markers.
- thread_pool.h: future_state::set() is now templated and get_value() is
ref-qualified; pass seastar::internal::monostate{} for the void case and
move the state before reading its value.
These crimson changes need the new seastar, so they share one commit with the
submodule bump. The build stays at Seastar_API_LEVEL 6 here; the level is
raised in the following commit.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
rely on 'bucket sync status' instead of looking up sync-status object.
it reports that there are no sync sources once the bucket's disabled
flag has propagated. also add a meta checkpoint after disabling.
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Add unit-tests to recreate the problems found by the IO Sequencer in the previous commit.
Some tests here rely on frameworks added in Umbrella and as such we are keeping them
independent (in their own PRs).
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
Signed-off-by: Matty Williams <Matty.Williams@ibm.com>
Assisted-by: IBM Bob:Claude/GPT
Some binaries and man pages were not included in rpm builds or debian
builds. This adds those artifacts to ceph.spec.in
debian/ceph-common.install and debian/radosgw.install.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
mgr/smb: only resync clusters that reference a changed resource
Reviewed-by: Anoop C S <anoopcs@cryptolab.net>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
The vendor stylizes it as NGINX.
Previously docs capitalized it as either NGINX, Nginx or nginx. nginx
was the preferred capitalization before commercialization of the
software.
Signed-off-by: Ville Ojamo <git2233+ceph@ojamo.eu>
objects only when it's not missing on the primary too
The issue was introduced by 60537bdd2f
which didn't fix the issue it was supposed to because of the same error
this commit tries to fix.
Fixes: https://tracker-origin.ceph.com/issues/78676
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
ow_gap_from_last_entry() returns how much the node grows when the tail entry
is overwritten. However, it compared *value* lengths only.
overwriting pg-log key (31B) is longer than a _fastinfo key (9B) -
So the growth was under-counted by 22 bytes.
Also assert in _append()/_overwrite() that the write stays within capacity() to
avoid similar issues.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
period commit only triggers async push (RGWPeriodPusher)
from the a zone's gateway to the other zones. it doesn't block
until they've applied it. a reconfigure delay alone might not
be sufficient. add checkpoint retries to allow for lag.
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
mgr/volumes: accept unit with subvolume resize
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Neeraj Pratap Singh <neesingh@redhat.com>
Reviewed-by: Christopher Hoffman <choffman@redhat.com>
current io exerciser sequences can model standalone truncates and writes,
but cannot generate a single transaction that truncates an object and
then writes sparse regions. Add SingleTruncateWriteOp, DoubleTruncateWriteOp,
and TripleTruncateWriteOp, wire them through IoSequence, ObjectModel, and
RadosIo, and extend EC sequences/tests so truncate+write transactions can
be reproduced and validated.
Signed-off-by: Matty Williams <Matty.Williams@ibm.com>
Assisted-by: IBM Bob:Claude/GPT
Problem:
Before this change, when the ISA plugin (classic build, dlopen'd),
would try to log, it'd segfault due to null g_ceph_context.
We need a way to make logging work for EC plugins in crimson.
Solution:
By building the ISA plugin WITH_CRIMSON, its logging is
routed to seastar's logger, solving the issue.
It is not build separately and dlopen'd like in classic because
doing so would require the plugin to have its own seastar logger
copy, an undesirable outcome.
It is a statically built library in the crimson-osd binary, and thus
it shares the single seastar logger. The library is linked with
--whole-archive so the self-registration constructor is not dropped.
Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
This commit adds the functionality in EC plugin registry to support
built in (statically linked) plugins. This is done by 2 main changes:
1. introducing a new map, builtin_plugins, where plugins can register
a factory for itself at startup.
2. load() now first checks if the plugin is builtin and instantiates it,
otherwise it falls back to dynamically linking the plugin.
Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
prepare_data_device() was calling nvme_utils.preformat() unconditionally
for every OSD slot. With --osds-per-device N, this means the second osd
reformats the device after the first OSD had already created its vg
on it which makes vgcreate fail with "device has a signature".
this commit fixes this issue by checking api.get_device_vgs() before
preformatting: if a ceph VG already exists on the device, skip the format.
This mirrors the logic create_lv() already uses to reuse an existing VG.
Fixes: https://tracker.ceph.com/issues/78615
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
The test_invalid_client_id was failing due to the
incorrect returns by handle_command and in get_perf_data()
in mgr/ststs/fs/perf_stats.py
Introduced-by: f8f972182c
Fixes:https://tracker.ceph.com/issues/76162
Signed-off-by: Neeraj Pratap Singh <Neeraj.Pratap.Singh1@ibm.com>
Monitor.cc logs a "Health check cleared: <CODE> (was: ...)" line
for any health check clearing mid-test, with the code bare (no
parens) -- while the "Health check failed"/"Health check failed
(unmute)" lines wrap the code in parens. Every \(CODE\) entry in
this file therefore only matches the raise/failed form and misses
the corresponding cleared form, the same gap just fixed for
POOL_FULL.
Drop the escaped parens from the remaining entries so each matches
both log forms, consistent with the bare entries already present
(OSD_ROOT_DOWN, MDS_INSUFFICIENT_STANDBY, POOL_FULL).
Non-code entries (reached quota, overall HEALTH_, slow request,
noscrub, nodeep-scrub, osds down, insufficient standby, etc.) are
unchanged.
Fixes: https://tracker.ceph.com/issues/78149
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
An initial_pending LogNode always append_kv()s and never overwrites.
expect_overflow() was still called with can_ow=true whenever the tail entry is
_fastinfo. It then used only the overwrite gap while the append
itself consumed a full entryi - so the node rolled over far too late and
used_space() overran capacity().
This would result in `assert(capacity() >= used_space()`.
Gate can_ow on !is_initial_pending() so the append is predicted with the full
entry size and rolls over in time.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
The previous implementation computed ow_gap_from_last_entry() but never used
the result.
Use it to check only the additional space required when the tail
entry grows, which matches overwrite logic.
Note, this is a cleanup - behavior remains similar.
See 825c8f149c
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Show sync_time_stamp and metrics_updated_at as human-readable
local timestamps in peer_status and mgr status. Keep epoch in
omap and counter dump.
Fixes: https://tracker.ceph.com/issues/76506
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Expand nvmeof mtls test to include cephadm-signed cert
(ssl=true + enable_auth=true, no certs)
Also improve wait_for_service() logic to assert all
gateways are running.
Fixes: https://tracker.ceph.com/issues/78295
Signed-off-by: Vallari Agrawal <vallari.agrawal@ibm.com>
Switch all stat panels in the hardware and hardware compression
dashboards from lastNotNull to last reduceFunction. When a host is
unreachable or node-proxy stops, metric silence is ambiguous — it
could mean host down, agent crash, or scrape failure. lastNotNull
freezes the last known value (e.g. 4 NVMe drives), causing
inconsistency with the global Overview which reflects live count
reductions.
Use last so panels show N/A when no current data arrives.
Fixes: https://tracker.ceph.com/issues/78360
Signed-off-by: Afreen Misbah <afreen@ibm.com>
When fail_fs is enabled with max_mds > 1, _prepare_for_mds_upgrade()
issued fs fail and then continued unconditionally, skipping the
up:active wait. _complete_mds_upgrade() also set joinable=true without
waiting for in-rank MDS to recover.
Wait for all in-rank MDS to reach up:active before proceeding with the
upgrade and after re-joining the filesystem. Add fs.ready to the
mds_upgrade_sequence verify task so ceph-fuse teardown does not race
with MDS still in up:rejoin.
Fixes: https://tracker.ceph.com/issues/77835
Signed-off-by: Kobi Ginon <kginon@redhat.com>
On the systemd-resolved (debian) path, dnsmasq has only address= records
and no upstream, so queries it can't answer locally are forwarded via
/etc/resolv.conf which points back at systemd-resolved, which routes
the cname domains back to dnsmasq. The resulting loop burns a 5s
resolver retry per round trip which manifests itself in rgw s3tests
on Ubuntu running too slow hitting the job timeout.
Set no_resolv on that path so dnsmasq answers authoritatively and never
forwards. The rpm/NetworkManager path is unchanged, as dnsmasq there is
the system resolver and must forward upstream.
Fixes: https://tracker.ceph.com/issues/78572
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
crimson/osd: fix backfill deadlock in BackfillState::Waiting
BackfillState::Enqueuing unconditionally posts RequestWaiting{}
when budget available return false. Waiting can exit only via
ObjectPushed which requires an in-flight push. If the budget
is exhausted with no pushes in flight no objectPush will ever
arrive and the PG stalls permanently.
Solution: Introduce a dedicated BudgetBlocked state. When
budget_available() is false and tracked_objects_completed()==true
post RequestBudgetBlocked{} instead of RequestWaiting{}.
BudgetBlocked calls get_backfill_throttle() to suspend until a slots
free up, then fires BudgetAvailable{} which transitions directly back
to Enqueuing to dispatch the next batch of pushes.
Fixes: https://tracker.ceph.com/issues/77804
When a notification is clicked in the panel while the user is already
on the notifications page, the selected notification now updates
correctly by bypassing the preselect guard for query param changes.
Signed-off-by: Afreen Misbah <afreen@ibm.com>
librdkafka submodule
Vendors librdkafka v2.12.1 as a submodule (default) and teaches the
notification teuthology task to set up Kafka 4.x KRaft brokers. The
distro-shipped librdkafka 1.6.1 cannot SCRAM-auth against Kafka 4.x
brokers (#75900); the bundled version fixes that. Build with
WITH_SYSTEM_RDKAFKA=ON to opt back into the distro library (floor 2.6.1).
follwinf changes needed with teh submodule:
* build kafka_stub only in case of system librdkafka
* use the same header location in submodule and system
* supress compilation warning to avoid -WError issues
2.12.1 matches Fedora(44)'s current librdkafka-devel, so the vendored copy
tracks a version that distro packagers have already vetted rather than
whichever release happens to be latest upstream.
The teuthology version matrix picks one of {3.9.2, 4.1, 4.2, 4.3} per run.
3.9.2 covers the last Zookeeper-based release for the migration cohort.
4.1/4.2/4.3 track Apache's current three supported minor lines and are
resolved to the latest patch at test time via dlcdn.apache.org/kafka/, so
new patches within a supported minor need no PR update. A new minor line
(4.4) requires renaming one YAML.
* new java version (17) is needed for kafka 4.2 and up (we wil use it on
all version)
* kerberos task need to run before the kafka install task
After pulling this branch, fetch the new submodule:
git submodule update --init src/librdkafka
Fixes: https://tracker.ceph.com/issues/77336
Signed-off-by: ShreeJejurikar <shreemj8@gmail.com>
Co-authored-by: Yuval Lifshitz <ylifshit@ibm.com>
Transaction::append() asserts both transactions share data_features.
The per-collection batcher merged queued client txns unconditionally,
so a data_features mismatch would be asserted in build_next_batch().
Use diffrent data_features as a grouping boundary.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Per-collection batching merges many client txns into one seastore txn.
Batched OP_OMAP_RMKEYS is not stable yet, possibly due to an exposed
internal bug that is seen with the new behavior.
Avoid batching OMAP_RMKEYS for now.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Fixes: https://tracker.ceph.com/issues/76507
Signed-off-by: pujaoshahu <pshahu@redhat.com>
Summary: Updated submit button labels in edit forms to display "Save" instead of "Edit User", "Edit Pool", or "Edit Host" for better UX consistency, while keeping form titles unchanged.
Modified Files
role-form.component.ts: Added submitAction property to control submit button label by mode; edit mode uses Save changes, create mode uses Create Role.
role-form.component.html: Submit button now binds to submitAction instead of action/resource text.
role-form.component.spec.ts: Added tests for submitAction behavior in create and edit modes.
user-form.component.ts: Uses submitAction property; edit mode label updated to Save changes.
user-form.component.html: Submit button uses submitAction binding.
user-form.component.spec.ts: Added/updated tests covering submitAction behavior.
pool-form.component.ts: Uses submitAction property; edit mode label updated to Save changes.
pool-form.component.html: Submit button uses submitAction binding.
pool-form.component.spec.ts: Updated submit label test expectation for edit mode.
hosts.component.ts: Edit host modal submit button text changed to Save changes.
hosts.component.spec.ts: Updated test to match Save changes button text.
app.constants.ts: In the current workspace snapshot, there is no SAVE constant added under ActionLabelsI18n.
Signed-off-by: pujaoshahu <pshahu@redhat.com>
Signed-off-by: pujashahu <pshahu@redhat.com>
fixes: https://tracker.ceph.com/issues/78332
Before
===
The configuration form had a TypeScript compilation error and could not properly support editing client-specific configurations. The form lacked the ability to:
- Configure different values for specific client entities (e.g., client.rgw.*, client.admin, client.radosgw-gateway)
- No way to Add/remove multiple client entity entries dynamically
- No way to provide autocomplete suggestions for existing client entities
After
===
Users can now edit configuration options individually for any client entity, with a clean UI that supports:
- Generic client entity support: Configure any client.* entity (RGW daemons, admin users, CephFS clients, etc.)
- Autocomplete with custom values: Select from existing client entities or enter custom ones (e.g., client.rgw.my-daemon, client.admin)
- Dynamic entry management: Add/remove multiple client configuration entries
Signed-off-by: Naman Munet <naman.munet@ibm.com>
mgr/dashboard: restricting admin user to revoke its own admin permissions
Reviewed-by: Afreen Misbah <afreen@ibm.com>
Reviewed-by: Sagar Gopale <sagar.gopale@ibm.com>
I checked a couple of gherkin linters as an alternative but all of them
are not really well maintained. There are couple of new projeects but
even they are simply maintained by a single guy so i don't think it'll
get enough contributions later on. So instead, I am moving it to
prettier. Although we miss some functional validation, it'll take care
of some basic formatting.
Fixes: https://tracker.ceph.com/issues/78528
Signed-off-by: Nizamudeen A <nia@redhat.com>
When a rewrite transaction publishes via no-conflict handoff, merge_content_to
can update an already CRC-stamped initial-pending fixedkv page (copy-dest of a
concurrent split). It refreshed last_committed_crc but not the in-extent phy
checksum, so the page could be written with new content and a stale stamp.
Debug asserts only compare last_committed_crc to calc_crc32c(), so the mismatch
survived until a later cold read aborted with "fixedkv extent checksum
inconsistent".
Recalculate the CRC and call update_in_extent_chksum_field together in both
LBALeafNode and FixedKVInternalNode merge_content_to, matching
apply_delta_and_adjust_crc / update_lba_mappings.
Fixes: https://tracker.ceph.com/issues/77022
Signed-off-by: Kautilya Tripathi <kautilya.tripathi@ibm.com>
When the `rgw_copious_policy_logging` option is set to true, a
detailed trace of policy evaluation is logged.
Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
(I wanted to see how it performed on rebase conflict resolution.)
Assisted-by: Claude Fable 5 <noreply@anthropic.com>
(I figured I should have it look at the policy evaluation code for
bugs while it's included, and it found a few mistakes in output.)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Create a log entry where we can fill a buffer with `format` instead of
needing to go through stringstream.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Extract the Redmine auth check added in the previous commit into a
standalone verify_redmine_auth(R) function so it can be unit tested
in isolation, and add src/script/test_ptl_tool.py covering:
- verify_redmine_auth(): invalid key (AuthError), a key that
authenticates but lacks permission (ForbiddenError), a valid key,
and confirming unrelated Redmine errors (ServerError) still
propagate normally rather than being misreported as a credentials
problem.
- AuditReport.post_consolidated_review(): logs success on 2xx, logs
an error (rather than failing silently) on a non-2xx GitHub
response, never calls out to GitHub under --dry-run, and is a
no-op when the report has no issues to post.
No behavior change to verify_redmine_auth() itself -- this is a pure
extraction plus tests. ptl-tool.py has no existing test suite, so
these are self-contained (mocked Redmine/requests, no network access,
no real git checkout needed) and run with plain pytest; see the
module docstring for the exact invocation.
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
Invalid credentials were handled inconsistently:
- A missing GitHub/Redmine token was caught with a clear error at
startup, but an invalid or expired one was not: the Redmine
client is constructed lazily by python-redmine, so a bad
~/.redmine_key was never actually exercised until
manage_qa_tracker() called R.project.get() -- which runs *after*
PRs have been merged and the integration branch/tag has already
been pushed to ceph-ci. The result was an unhandled traceback
well after real side effects had already happened, with no
actionable message.
- post_consolidated_review() posted the consolidated audit review
to GitHub without checking the response status at all, so a bad
or under-scoped token would fail silently there while every other
GitHub write call in the file already checks status_code.
Fix both:
- Immediately after constructing the Redmine client, make a cheap
R.user.get('current') call and catch AuthError/ForbiddenError,
exiting with a clear message before any merging or pushing
happens.
- Check the response status in post_consolidated_review() and log
an error on failure, matching the pattern already used by the
other GitHub POST call sites in this file.
Verified with py_compile plus live --dry-run runs against
tracker.ceph.com: a deliberately invalid PTL_TOOL_REDMINE_API_KEY
now exits 1 immediately with a clear message and no git side
effects, while a valid key proceeds exactly as before.
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
- Escape user-controlled content before Carbon innerHTML rendering
- Whitelist localStorage deserialization keys, prune stale read map
- Replace deep equality with ID comparison in removeToast
- Gate ngAfterViewChecked DOM queries behind a dirty flag
- Deduplicate by title+type+message; show occurrences count
- Fix bell icon unread dot clearing on new occurrences
- Fix view more pre-selection via route queryParams observable
- Save individual notifications instead of HTML-merged messages
- Convert notifications bell component to signals with OnPush
- Add OnPush to notification-item and toast components
- Add e2e tests
- Fix styling of notification panel
Signed-off-by: Afreen Misbah <afreen@ibm.com>
rgw_gc: don't fail when processing entry with nonexisting pool
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Pritha Srivastava <prsrivas@redhat.com>
mgr/smb: add support for RGW shares with external Ceph clusters
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Anoop C S <anoopcs@cryptolab.net>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
- adds view more link to toast which takes to view full toast message
- allow notifications to be clickable in notification panel taking user to the particular notification
- add routes to eahc notitification in notificatio page
- extend duration for error notifications - as per carbon error notifications should persist longer since users need time to read
Signed-off-by: Afreen Misbah <afreen@ibm.com>
Block-manager users were denied access to the NVMe/TCP page because
host listing APIs require hosts read permission.
Fixes: https://tracker.ceph.com/issues/77952
Signed-off-by: Abhishek Desai <adesai@redhat.com>
Root cause: On FIPS-compliant systems, the OpenSSL provider rejects hashlib.md5() calls that lack the usedforsecurity=False flag, because MD5 is not an approved algorithm for security-sensitive use. This causes the MOTD set command — and the /api/motd create endpoint — to raise a ValueError and crash whenever a new MOTD is saved.
Fix: Pass usedforsecurity=False to hashlib.md5(). This tells the FIPS provider that MD5 is being used only as a non-cryptographic checksum (to detect whether a user has already dismissed a specific MOTD message), which is a legitimate use-case that FIPS allows.
Fixes: https://tracker.ceph.com/issues/78233
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
_find_modifications() regenerated every cluster whenever a JoinAuth,
UsersAndGroups, TLSCredential, or ExternalCephCluster changed, since
these can be shared across clusters. Use the existing lookup
helpers to resync only the clusters that actually reference it.
For rgw creds resync everything(just like old way), as narrowing
it scope means scanning every share in the store (which may not scale well),
so not worth a change.
Fixes: https://tracker.ceph.com/issues/78245
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
When no OSDs within a CRUSH bucket can be found to upgrade, the earlier error
message indicated the minimum number of PGs affected if any OSD was removed
from the set. For e.g.,
"Error EBUSY: unsafe to upgrade osd(s) at this time (at least X PG(s) will
become offline if any OSD out of the Y in CRUSH bucket 'foo' is stopped)"
This was inaccurate in some cases because the number of PGs affected is
determined only from the last tested OSD in the CRUSH bucket based on the sort
order (i.e., OSD with least number of PGs per OSD). Based on the CRUSH rules
and placement, this doesn't mean that the least number of PGs are affected if
this OSD is stopped. There may be other OSDs in the set that affect a smaller
number of PGs if made offline.
But with the way ok-to-upgrade logic uses the convergence factor, not all OSDs
would be tested for the offline pg check. Therefore, it is not possible to
accurately determine the minimum number affected PGs.
In view of the above, the error message is modified as shown below to be
slightly more generic but still convey the reason:
"Error EBUSY: unsafe to upgrade osd(s) at this time (one or more PG(s) will
become offline if any OSD out of the Y in CRUSH bucket 'foo' is stopped)"
Fixes: https://tracker.ceph.com/issues/78425
Signed-off-by: Sridhar Seshasayee <sridhar.seshasayee@ibm.com>
Issue: The Export Multi-site Realm Token feature in the Dashboard showed no token and no realm details for any realm that had a secondary zone configured (i.e. the realm had been replicated to another cluster). The API endpoint GET /api/rgw/realm/get_realm_tokens returned an empty list or raised a 500 Internal Server Error.
Fixes: https://tracker.ceph.com/issues/78232
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
Previously, a real (non-dry-run) push of the integration branch/tag to
ceph-ci was silent -- only the "[DRY RUN] Would push ..." path logged
anything. Add matching log.info() calls on the real-push path, and
include the literal `git push <remote> <ref>` invocation in the message
so it can be copy-pasted and re-run manually if needed (e.g. after a
network blip, or to re-push without re-running the whole merge).
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
Add rgw_enable_dedup_threads (default true) and rgw_nfs_run_dedup_threads
(default false) config options to control whether a given RGW instance
participates in dedup background processing.
This follows the same pattern used by rgw_enable_gc_threads,
rgw_enable_lc_threads, and rgw_enable_restore_threads. The config is
evaluated at startup in init_dedup(); when disabled, the dedup Background
object is not created, the thread is not spawned, and the instance does
not register a RADOS watch on the dedup control object.
Disabled RGW instances are invisible to the dedup cluster coordination
mechanism -- they receive no notifications, cause no timeouts, and do
not grab shard tokens.
Signed-off-by: Gabriel BenHanokh <gbenhano@redhat.com>
Assisted-by: Cursor Opus-4.6 <cursoragent@cursor.com>
omap_complete in read_result_t can be uninitialized if ECSubReadReply
contains an empty map of omap_complete information.
Fixes: https://tracker.ceph.com/issues/76953
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
Implement support for creating RGW-backed SMB shares on external Ceph
clusters with user configuration.
Fixes: https://tracker.ceph.com/issues/77784
Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Cluster-manager users were denied access to the CRUSH map page because
the underlying API requires pool read permission.
Fixes: https://tracker.ceph.com/issues/77952
Signed-off-by: Abhishek Desai <adesai@redhat.com>
Read-only users could see the Settings icon but were denied access
to user management pages. Remove user read permission from the
read-only role so the administration menu stays hidden.
Fixes: https://tracker.ceph.com/issues/77952
Signed-off-by: Abhishek Desai <adesai@redhat.com>
The Help menu option redirected read-only users to an Access Denied
page. Hide it when the user lacks config-opt read permission.
Fixes: https://tracker.ceph.com/issues/77952
Signed-off-by: Abhishek Desai <adesai@redhat.com>
Remove SilenceFormComponent from the silences list page, which
incorrectly required create permission and caused a blank page for
users with prometheus read access only.
Fixes: https://tracker.ceph.com/issues/77952
Signed-off-by: Abhishek Desai <adesai@redhat.com>
Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-tabs/prometheus-tabs.component.html
- Added permissions
Add the flags listed for ceph osd pool set in ceph osd pool get.
Remove nonexistent flag debug_fake_ec_pool in ceph osd pool set.
Confirm the additions/removals from MonCommands.h.
Signed-off-by: Ville Ojamo <git2233+ceph@ojamo.eu>
The can_ow branch of LogManager's expect_overflow computed:
```
remain = capacity() - get_last_pos() - reserved_len
```
all uint32 operands, once the log leaf node is near full
(get_last_pos() + reserved_len >= capacity()) this subtraction underflows.
The node never rolls to a new leaf, instead it overflows the
16 KB block at commit-time delta replay.
Captured at the replay overflow point (per-collection batching, 4K randwrite):
```
LogNode OVERFLOW at replay: pos=16641 size=58 reserved_len=3098
reserved_size=6 capacity=16328 LIMIT=16384
log_node.h : In function 'void LogKVNodeLayout::set_last_pos(uint32_t)',
ceph_assert(pos <= LOG_NODE_BLOCK_SIZE)
```
Here reserved_len (3098) is accurate: ~13543 committed + 3098 pending =
16641 = pos, i.e. the node was already ~13.5 KB full and the predictor
should have rolled over. Instead capacity - get_last_pos - reserved_len
went negative (16328 - ~13273 - 3098 < 0), wrapped in uint32, and the
check passed; pos reached 16641 > 16384 and set_last_pos asserted.
This was exposed by the per-coll batching where many overwrites append in
a single txn.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Previously, the per-collection ordering_lock provided both ordering and
single-holder exclusion, causing same-collection transactions to be serialized
one at a time.
Replace that with a per-collection queue and a single dispatch loop. When a
collection has a batch in flight, newly arriving transactions are queued.
The dispatch loop later drains the queue and merges transactions into one
SeaStore transaction (batch). Resulting in a one build, one ool_write and one journal record for the entire batch.
Only one batch is in flight per collection, so same-collection concurrency is
still prevented and ordering is preserved by the queue.
Callbacks are unchanged: FuturizedStore drains each caller's on_commit before
enqueueing, so only ops are merged. Each caller's promise is fulfilled when the
merged batch commits.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Better-defined generator semantics; many internal improvements,
a couple found bug fixes, minor feature enhancements.
Considerable simplification that streamlines and improves the
baseline performance of library internals. Updates tests and
example documentation.
- Add inclusive()/exclusive() selector endpoints.
- default is still: select { a, b } == [a, b).
- endpoint semantics work for reads, pagination,
range-erase, split planning.
- tests: selector endpoint combinations; endpoint handling; multiple
value types from generators..
- runtime byte-pointer helpers now actually just runtime
Assisted-by: Codex:GPT-5
Signed-off-by: Jesse Williamson <jfw@ibm.com>
The background sync-log-trim thread already skips bucket trim on zones whose
sync module does not export data , but the admin command had no equivalent
guard, so running it on an archive zone could delete instance metadata the
zone is meant to retain.
So, refuse the command on non-exporting zones unless --yes-i-really-mean-it is
given.
Fixes: https://tracker.ceph.com/issues/78364
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
first_interval_in_write can be accessed before it has been initialized. This
is harmless as at worst it will just cause the 1st I/O to a FastEC PG to be
slightly slower than necessary by disabling some optimizations.
However it needs fixing so the teuthology Valgrind job can check for other
issues.
Fixes: https://tracker.ceph.com/issues/76953
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
Raise a few low-frequency, high-signal bilog trim events so they are
visible at the default log level:
Trim pace is bounded by the rgw trim config options and these events
fire at most once per bucket or once per trim cycle, so they are not
expected to be chatty.
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
The peer -ENOENT handling in RGWReadRemoteStatusShardsCR no longer
consults the local bucket layout (whether Deleted flag set or not),
so its bucket_info member and the matching constructor arg are
not used anymore.
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
When a peer returns -ENOENT for a bucket's sync status, the old code only
purged the log if the local layout already carried BucketLogType::Deleted.
That flag may never arrive once the deleting zone removes its own instance
(#70858), so trim aborted with -EINVAL and left bucket.instance metadata
orphaned.
But an all-peer -ENOENT is also ambiguous: a live bucket whose sync status is
not yet initialized looks the same. The Deleted flag is unreliable here,
and the local entrypoint is not authoritative during creation (the
instance syncs to peers before the entrypoint). So on all-peer -ENOENT,
confirm the bucket is really gone by reading its entrypoint from the
metadata master, which is authoritative and available immediately on
creation; if this zone is the metadata master its local read already
suffices. Only on confirmed deletion remove the orphaned instance
directly; on any failure, skip and retry on the next trim cycle.
Fixes: https://tracker.ceph.com/issues/70858
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
An all-peer -ENOENT does not by itself mean a bucket is deleted: a live
bucket whose sync status is not yet initialized returns -ENOENT too. Add
two testcases that verifies we do not accidentally delete instance of a
live bucket:
- test_bucket_log_trim_live_empty_bucket_not_removed: a data-less bucket
never gets sync status, so every peer reports -ENOENT; autotrim must not
remove its instance.
- test_bucket_log_trim_new_bucket_entrypoint_not_synced: a new bucket
whose instance has synced to the secondary before its entrypoint must
survive autotrim. A delay_meta_sync_bucket_entrypoint_store injection
forces that window.
Tests: https://tracker.ceph.com/issues/70858
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
Adds test_bucket_log_trim_enoent_race_after_reshard to reproduce the
exact failure from tracker #70858: when autotrim runs on the primary
zone first and fully cleans up (including removing its own bucket.instance
metadata), then an autotrim on the secondary zone asks the primary
and receives -ENOENT.
The secondary hasn't received the BucketLogType::Deleted
flag yet (metadata sync is stalled via delay injection), so the current code
left StatusShards{generation=0, shards=[]} which caused take_min_status()
to fail with -EINVAL, leaving the bucket.instance metadata permanently
orphaned.
Tests: https://tracker.ceph.com/issues/70858
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
Fixes: https://tracker.ceph.com/issues/77369
Signed-off-by: Devika Babrekar <devika.babrekar@ibm.com>
Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html
-removed Directory field, as it is no longer needed in form
Add tests to validate that CopyObject honors x-amz-tagging-directive.
New tests:
- test_object_copy_retaining_tagging: default copy keeps the source tags
- test_object_copy_tagging_directive_copy: COPY keeps the source tags
- test_object_copy_tagging_ignored_without_directive: a tagging header is ignored without a REPLACE directive
- test_object_copy_replacing_metadata_and_copying_tagging: metadata REPLACE keeps the source tags
- test_object_copy_replacing_tagging: REPLACE applies the new tag set
- test_object_copy_replacing_tagging_with_none: REPLACE with no tags clears them
- test_object_copy_to_itself_replacing_tagging: retag onto the same key
- test_copy_object_replacing_tagging: replaced tags replicate across zones (multisite)
Signed-off-by: Matthew N. Heler <matthew.heler@hotmail.com>
CopyObject ignored x-amz-tagging-directive, so REPLACE never took
effect and copies kept the source object's tags. Honor the directive
independent of the metadata directive: REPLACE applies the given tags
(or clears them), COPY keeps the source tags.
Signed-off-by: Matthew N. Heler <matthew.heler@hotmail.com>
The coroutine conversion accidentally passed nullptr to NVME_IOCTL_ADMIN_CMD,
so Identify always failed and SeaStore fell back to st_blksize (e.g. 128K),
breaking journal roll_start alignment on mkfs.
Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
Fixes: https://tracker.ceph.com/issues/77813
Signed-off-by: Devika Babrekar <devika.babrekar@ibm.com>
Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html
-conflict while rebasing for SSO related parameters
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts
-conflict while rebasing for SSO related variables
innernode_split_merge_balancing, omap_iterate, list and monotonic_inc grow
the tree to a fixed depth, so under ASan a larger value reaches the same
depth (same split/merge paths) with far fewer keys. It stays below the
per-kv limit so inserts keep the normal path.
Scale the extent-count bound in innernode_split_merge_balancing with the
value size accordingly.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
Fix race hazard in PeeringState::proc_lease where it read
a std::optional value which could be modified by another
thread at the same time causing an abort.
There is already a lock to protect accesses to this state
to make them thread safe, but the code wasn't using it.
Fixes: https://tracker.ceph.com/issues/54932
Assisted-by: IBM Bob 2.0.1
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
After an OSD that has not crashed is marked down there is a race hazard
where a message can be deliever to the OSD a second time. Different
asserts are hit depending on which message is duplicated.
This issue is seen in tests which mark osds down as an error inject
and very occasionally in the field where there are other issues
(e.g. network problems) that are causing osds which have not
crashed to be marked down.
The fix is to change the order in which the OSD processes a
new epoch and OSDMap which marks the OSD as down, it must
first consume the map so that old messages will be filtered
out and then call rebind to reset all the connections.
Fixes: https://tracker.ceph.com/issues/58417
Assisted-by: IBM Bob 2.0.1
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
When add_fscrypt_key() failed it jumped to the err label, which then
read the uninitialized keyid buffer into a key specifier and issued a
key removal for it. add_fscrypt_key() only populates keyid on success,
so this read uninitialized stack memory. Return the error directly
instead, since no key was added and there is nothing to remove.
Also stop overwriting the original error with remove_fscrypt_key()'s
return value on the policy-set failure path, so the real failure is
reported to the caller.
Fixes: https://tracker.ceph.com/issues/78246
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
_wrap_name() returns bool, but two encryption error paths did "return r"
with r < 0, which converts to true. Callers then treated the failure as
success and used the unencrypted name. Return false instead.
Fixes: https://tracker.ceph.com/issues/78246
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
mount() holds client_lock through a unique_lock (cl), but the dummy
encryption path unlocked and relocked the underlying mutex directly,
bypassing cl. On fscrypt_dummy_encryption() failure it returns early
without relocking, so cl's destructor then unlocks an already-unlocked
mutex, which is undefined behavior. Only reachable when
client_fscrypt_dummy_encryption is enabled.
Unlock/relock through cl so its ownership state stays consistent.
Fixes: https://tracker.ceph.com/issues/78246
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
Prefer the distro-packaged sccache (installed via dnf) over downloading a
release tarball with curl. Fall back to the curl download when the package
is absent or on non-dnf distros, so existing behavior is unchanged.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
when referencing the "Backport" field in tracker.ceph.com, we
used "Backports". but the field is named "Backport" not "Backports".
in this change, we replace "Backports" with "Backport" when it
references this field.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
We already re-opt into telemetry immediately after upgrading,
but this warning still sometimes comes up and is detected
by the badness check. Since we are following the normal
procedure to silence the warning, the next step is to
just ignore this.
Fixes: https://tracker.ceph.com/issues/77382
Signed-off-by: Laura Flores <lflores@ibm.com>
Store sync completion time (last_synced_snap.sync_time_stamp)
as utime_t (Unix epoch) instead of coarse monotonic time so
the metric is meaningful to operators.
Fixes: https://tracker.ceph.com/issues/76506
Signed-off-by: Kotresh HR <khiremat@redhat.com>
The "disabled" search only matches sccache's Disabled("disabled")
payload, not "dist-client feature not selected" or the NotConnected
states. Those reach the success branch, so the job counts become
SchedulerStatus-NOTFOUND, JOB_POOLS is never defined, and ninja
rejects the manifest. Key off the JSON lookup's error instead to
cover every non-dist state.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
Recompute ro_start and ro_end with compute_ro_range() and compare them
against the cached values, and cover single-shard maps.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
slice_map() accumulated the slice bounds against the wrong operands,
and included parity shards in ro_start and ro_end, which only track
data.
Introduced by 9e2841ab16 ("osd: Introduce optimized EC").
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
BackfillState::Enqueuing unconditionally posts RequestWaiting{}
when budget available return false. Waiting can exit only via
ObjectPushed which requires an in-flight push. If the budget
is exhausted with no pushes in flight no objectPush will ever
arrive and the PG stalls permanently.
Solution: Introduce a dedicated BudgetBlocked state. When budget_available()
is false and tracked_objects_completed()==true post RequestBudgetBlocked{}
instead of RequestWaiting{}.BudgetBlocked calls get_backfill_throttle()
to suspend until a slots free up, then fires BudgetAvailable{} which
transitions directly back to Enqueuing to dispatch the next batch of pushes.
Fixes: https://tracker.ceph.com/issues/77804
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
slow_op_pools can be empty (all poolids 0/out-of-range) while
slow_op_types is not, making max_element return end(); dereferencing
it is UB.
Fixes: https://tracker.ceph.com/issues/78184
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
The removed_ranges erase loop in omap_get() called erase(out_it->first),
which invalidates out_it, then did ++out_it on the dead iterator (UB).
When adjacent keys were erased this skipped keys that should have been
removed:
Expected: { "k01", "k05", "k06" }
Actual: { "k01", "k03", "k05", "k06" }
Extract the loop into a static remove_keys_in_ranges() helper so it can
be unit tested without an ObjectStore, and rewrite it as a range erase:
removed_ranges is a sorted map of non-overlapping [start, end) ranges.
Fixes: https://tracker.ceph.com/issues/78177
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
ceph_module.mgr_log() emitted every record at dout(0): a record either
passed the Python-side gate and went unconditionally to both the log
file and the in-memory recent buffer, or never reached the C++ log at
all. The two-level debug_mgr semantics (file level / memory level)
never applied, so capturing third-party DEBUG logs meant sending each
record to the log file and a log_max_recent slot; with the kubernetes
client logging multi-megabyte HTTP response bodies at DEBUG, the
recent buffer alone could grow to tens of gigabytes.
Pass the record's level through mgr_log() and emit at the mapped ceph
level: CRITICAL/ERROR at 0, WARNING at 1, INFO at 2, DEBUG at 20.
INFO maps to 2 so it stays visible in the log file at the default
debug_mgr=2/5; DEBUG maps to 20 so floods are dropped there, while
debug_mgr=2/20 captures third-party DEBUG in the in-memory buffer
without touching the log file. The Python-side gate follows the
higher of the two debug_mgr levels so memory-only records still
reach the C++ side.
Fixes: https://tracker.ceph.com/issues/77633
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
MgrRootHandler captures third-party logs from the Python root logger
and emits them through the _ceph_log method of whichever mgr module
last configured logging. A handler on the root logger outlives any
single module, so once that module unloads the handler emits through
a stale pointer until another module reconfigures logging.
Add a free mgr_log() function to the ceph_module binding, emitting
via dout() like PyModuleRunner::log but with no PyModule involved,
and rewrite MgrRootHandler to route through it. The handler no
longer references a module instance, so it cannot go stale.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
\(POOL_FULL\) only matches the "Health check failed/update" cluster-log
format (code wrapped in parens). It misses the "Health check cleared"
format, where the code is not parenthesized (see src/mon/Monitor.cc),
so a pool clearing its full state mid-upgrade-test was not ignorelisted.
Drop the escaped parens so the pattern matches both forms, consistent
with other bare entries already in this file (OSD_ROOT_DOWN,
MDS_INSUFFICIENT_STANDBY).
Fixes: https://tracker.ceph.com/issues/78149
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
The dashboard backend API suite occasionally fails in CI on the job's
7200 second timeout alone, with every test passing. Suite runtime
varies with builder load: identical runs of the same 311 tests took
anywhere from about 5400 to over 7000 seconds, and teardown needs
roughly another 180 seconds on top. On the runs that landed at the
high end, only 60 to 80 seconds of margin were left before the
timeout fired. Cutting setup overhead gives the suite that margin
back.
DashboardTestCase.setUpClass() restarted every mgr twice: once in
MgrTestCase.setup_mgrs(), and again right after in _assign_ports(),
whose only job is to set the per-mgr dashboard port, which has to
happen while the mgrs are down.
Let subclasses declare their module ports in a MODULE_PORTS class
attribute instead. setup_mgrs() assigns them while the daemons are
already stopped, so the single restart it performs picks them up and
the second stop/fail/restart cycle disappears.
The assignment loop moves to _assign_module_ports(). _assign_ports()
keeps its old stop/assign/restart contract for callers that reassign
ports outside class setup (test_prometheus, test_dashboard,
test_module_selftest) and delegates to the shared helper.
With 66 dashboard test classes per API suite run this removes one
full mgr bounce per class, roughly 10 to 15 minutes of wall clock in
the CI runs examined.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
Add a build target that builds standalone RGW in addition to normal RGW,
and add an RPM for it that only installs the necessary bits.
Signed-off-by: Daniel Gryniewicz <dang@fprintf.net>
Member access binds tighter than ?:, so the handler attached only to the
recover_object() branch and exceptions from recover_object_with_throttle()
escaped unhandled. Parenthesize the ternary to cover both branches.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
BlueStore's PMEMDevice backend targets byte-addressable persistent
memory exposed as a DAX device, in practice Intel Optane DC persistent
memory. Intel Optane has been discontinued since 2021 and there is no
mainstream replacement, so the backend has effectively no hardware left
to run on. It was always experimental and has seen no functional change
since the DML/DSA offload landed in 2022; every commit to it since has
been a formatting sweep.
Keeping it builds in a chain of dependencies that nothing else needs:
libpmem, libndctl and libdaxctl, plus dml for the DSA offload that only
works on a Sapphire Rapids CPU. Remove the backend and everything tied
to it.
RBD persistent write-back cache (WITH_RBD_RWL) still uses PMDK's
libpmemobj, so the pmdk submodule, WITH_SYSTEM_PMDK, Buildpmdk and
Findpmdk stay. WITH_SYSTEM_PMDK now depends on WITH_RBD_RWL alone, and
Buildpmdk no longer builds ndctl support.
- remove the WITH_BLUESTORE_PMEM option, HAVE_BLUESTORE_PMEM and
HAVE_LIBDML
- delete src/blk/pmem/PMEMDevice.{cc,h} and the pmem block_device_t
- drop the pmem value from the bdev_type option
- remove the --bluestore-pmem vstart flag
- drop the libpmem, libndctl and libdaxctl build deps from debian and
rpm, keeping libpmemobj for RWL
- delete the Finddml, Findndctl and Finddaxctl cmake modules
- remove the DSA/DML and ndctl documentation
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
the mon, osd and mds register a "heap" asok command that forwards to
ceph_heap_profiler_handle_command, but the mgr never did, so
`ceph daemon mgr.<id> heap stats` returns "no valid command found".
that leaves no way to tcmalloc-profile a leaking mgr through its admin
socket, which is what chasing mgr memory growth needs.
register the same command on MgrStandby's admin socket. its hook lives
for the whole process, so it works on both the standby and the active
mgr. heap output goes to the bufferlist, as on the other daemons, while
status keeps using the formatter.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
bench_async_write_worker destroyed AsyncIOContext while the finisher
still ran async_io_callback after setting completed. Track in-flight
callbacks per worker and drain before tearing down the io_queue.
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
'export' sets file_fd to STDOUT_FILENO for '-', but cleanup guarded
close() on STDIN_FILENO (always true), closing stdout. Guard on
STDOUT_FILENO instead, matching the 'import' path.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
`if (!stdout)` tested the libc FILE* (never null) instead of the
use_stdout flag, so the ofstream was never deleted when writing to
a file, leaking it and leaving its buffer unflushed. Test use_stdout.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
do_put()/do_append() set fd to STDIN_FILENO for '-', but cleanup
guarded close() on STDOUT_FILENO (always true), closing stdin.
Guard on STDIN_FILENO instead.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
Add --async-write-fsync and --shared-file benchmark options.
--async-write-fsync sets ceph_ll_io_info.fsync on each async write to model
Ganesha-style write+commit and skips the post-phase ceph_ll_fsync when enabled.
--shared-file directs all worker threads at one file to stress client_lock
contention on a single inode. Both options are recorded in JSON/text output.
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Added filesystem stats reporting to cephfs-tool.cc.
Helper functions
• fetch_statvfs() — uses ceph_ll_statfs on the root inode when --async-io
is set, otherwise ceph_statfs on mount_root
• report_fs_stats() — prints and optionally JSON-encodes:
• Total / free blocks
• File count
When it runs
• Before the iteration loop (after the bench directory is created)
• After all iterations finish (before the final report and optional cleanup)
Console output example
Filesystem statistics (before iterations):
Total blocks: ...
Free blocks: ...
Files: ...
JSON output (when --json is used) adds a filesystem_stats section with before
and after objects containing the same fields.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Set pthread names on all benchmark worker threads (wr-worker-N, rd-worker-N)
via ceph_pthread_setname so they are visible in top, perf, and lockstat
output during profiling.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Add --async-io to use ceph_ll_nonblocking_readv_writev for read and write
workers instead of synchronous ceph_read/ceph_write. Add --queue-depth to
limit outstanding async I/Os per thread via a counting semaphore and
pre-allocated AsyncIOContext pool. Async write uses ceph_ll_create; async
read uses ceph_ll_walk + ceph_ll_open and defers inode release until all
async ops including readahead complete. Reject --async-io with
--per-thread-mount since async workers require a shared mount.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
When built with CEPH_LOCKSTAT, add --lockstat-dump and --lockstat-threshold
to collect lock contention data during benchmark phases. Start collection
at benchmark begin, reset counters before each read/write phase, and dump
per-iteration/per-phase JSON files (e.g. base_iter1_write.json). Requires
a lockstat-instrumented libcephfs build.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Add --msgr-workers to override ms_async_op_threads before mount (1-24;
0 keeps the ceph.conf default). Controls async messenger I/O threads
independently of benchmark worker thread count. Validate the range at
startup and include the resolved value in console and JSON output.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Add --progress and --progress-interval to display live bandwidth, IOPS,
and ETA during read/write phases. A background progress_reporter thread
aggregates per-thread stats every 100ms and prints a single updating
status line. Progress percentage is based on elapsed time when --duration
is set, otherwise on files completed. Make ThreadStats fields atomic so
workers and the reporter can access them concurrently.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Add --client-oc and --client-oc-size to override libcephfs object cacher
settings before ceph_init. Enables benchmarking with the object cacher
enabled or disabled and with a configurable cache size. Resolved values
are shown in console and JSON output.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Add --perf-dump to write libcephfs client performance counters to a file
at the end of the benchmark. Uses ceph_get_perf_counters() while the
mount is still active so counters reflect the full benchmark run.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Add --duration to cap each read and write phase at N seconds instead of
running until all files are processed. Workers loop until the time limit
expires, cycling through their per-thread file set in duration mode.
Pass phase start time into worker threads for consistent cross-thread
duration checks. Only count each unique file once in stats even when
filenames are reused across cycles.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Add --json to write structured benchmark results (configuration,
per-iteration read/write metrics, and cross-iteration summary statistics)
to a file using JSONFormatter. Extend print_statistics() to optionally
mirror mean, stddev, min, and max into the JSON document. Improve
parse_size() to accept both SI (1000-based, e.g. "4MB") and binary
(1024-based, e.g. "4MiB") size suffixes.
Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
validate_input() rejected the valid TOKEN_CODE_SIZE length and accepted
all others. Compare with != so only a wrong length is rejected.
Fixes: https://tracker.ceph.com/issues/77872
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
If-None-Match: * must fail when the object exists, but the posix writer
did the opposite, disabling overwrite protection. Return
PRECONDITION_FAILED when the object exists.
Fixes: https://tracker.ceph.com/issues/77871
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
A versioned delete carries a non-empty version-id, but the MFA guard
flagged the empty case: versioned deletes bypassed MFA while plain
deletes wrongly required it. Test !instance.empty().
Fixes: https://tracker.ceph.com/issues/77869
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
run_command() captured a reference to the just-emplaced mon_commands
element into the send_message() continuation. mon_commands is a
std::vector, so a concurrent run_command() could reallocate it and
invalidate the reference before the continuation ran, dereferencing
freed memory.
No caller issues concurrent commands today, but the pattern is unsafe.
Take the result future before issuing the message, then coroutinize
the method so it is awaited directly instead of being captured into a
continuation lambda.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
handle_client_symlink (-ENAMETOOLONG), reclaim_session (-EPERM) and
handle_client_readdir_snapdiff (-EINVAL) each sent an error reply on a
failure path but fell through, replying to the same MDRequest a second
time. reclaim_session additionally went on to bind reclaiming_from,
bypassing the auth_name check. Return right after sending the reply.
Fixes: https://tracker.ceph.com/issues/77862
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
Config rgw_sts_key expects a 16-character hexadecimal key. The option
long_desc has an example with openssl rand -hex 16 which generates
16 hexadecimal bytes that consist of 32 characters rendered in ASCII.
Modify the example openssl command to output 8 bytes that matches the
required length of 16 characters.
Remove a space after a slash.
Raised in the doc bugs pad.
Signed-off-by: Ville Ojamo <git2233+ceph@ojamo.eu>
Refactored test fixture code to properly execute object context operations
within event loop context, fixing ceph_assert(osd != -1) failures.
Key changes:
- Split functions calling get_object_context() into implementation and
wrapper functions that schedule work on the primary OSD via event loop
- Added accessor functions (set_object_context, clear_object_contexts)
to encapsulate per-OSD object_contexts map access
- Fixed lambda capture bug in PGBackendTestFixture::update_osdmap()
- Refactored run_parallel_recovery_and_verify_callbacks() to execute
within proper event loop context
All object context operations now execute within the correct OSD context,
with get_object_context() as the single point querying the current OSD.
Added test ZeroSizeObjectWithAttributesRecovery to verify recovery of
zero-size objects with attributes after primary failover, ensuring
attributes are properly recovered on the failed shard.
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
Assisted-by: IBM-Bob:Claude-Sonnet
# Conflicts:
# src/test/osd/ECPeeringTestFixture.cc
Remove the full pg_map JSON dump at dout(30) which was flooding the
log queue with multi-MB entries on every tick. The much smaller
incremental dump is retained for debugging.
Fixes: https://tracker.ceph.com/issues/64082
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
New API with parameter checking was added in v2.25,
deprecating the original API used in this module.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Getting it from our own service avoids exposing us to
supply chain attacks in our QA infrastructure.
Fixes: https://tracker.ceph.com/issues/76927
Signed-off-by: Laura Flores <lflores@ibm.com>
This allows operators to do targeted GC work against specific shards, instead of working on all of them.
Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
AI-Assisted: Used AI to generate the initial implementation.
Automatically run nvme-gw disable before stopping daemons on maintenance
enter and nvme-gw enable after daemons restart on maintenance exit so
gateways fail over in a controlled way.
Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
The x-amz-expiration response header describes the current-version
Expiration lifecycle action for an object. s3_expiration_header() instead
selected between the Expiration and the NoncurrentVersionExpiration rule
based on whether the object key carried an instance id:
const LCExpiration& rule_expiration =
(obj_key.instance.empty()) ? expiration : noncur_expiration;
This was wrong in two ways. OLH resolution writes the current version's
instance id into the key before the header is computed, so even a plain
GET/HEAD of the current version (no versionId) was treated as a
non-current request and reported a NoncurrentVersionExpiration rule. And
x-amz-expiration is not meant to surface NoncurrentVersionExpiration at
all. A versioned bucket whose only rule was NoncurrentVersionExpiration
therefore returned a bogus expiry-date and rule-id on the current object,
for both a plain request and a versionId request.
Compute the header from the current-version Expiration rule only, and
return no header when the request targets a specific version. The header
helper now passes the client request key (s->object_key) rather than the
OLH-resolved key, so a plain GET/HEAD of the current version is no longer
misclassified as a versioned request.
Add a unit test covering a noncurrent-only policy (no header for either a
plain or a versioned request) and a combined policy (the current
Expiration rule for the current version, no header for a versionId
request).
Tracker: https://tracker.ceph.com/issues/77564
Reported-by: Saravanan Palanisamy
Signed-off-by: Lumir Sliva <61183145+lumir-sliva@users.noreply.github.com>
Refactor get_perf_schema_python() and get_unlabeled_perf_schema_python() to use Formatter::ObjectSection and Formatter::ArraySection RAII helpers instead of manual close_section() calls. Manual closes have have led to crashes when close_section() calls were left unguarded, for example when an OSD with no perf counters had it's perf counters queried.
Fixes: https://tracker.ceph.com/issues/74693
Signed-off-by: stzuraski898 <steven.zuraski@ibm.com>
we encode the description of a certain command, with comma-separated
values, which are represented in "key=value" form. the keys are a set of
configuration names, and their values' types are known. among them,
"positional" and "req" are of boolean type. before this change, we
consider "true" and "True" as true, otherwise we consider the value as
false. but this setting leads to confusion and could be a headache for
maintainers.
since all commands are determined at compile-time, and all commands'
descs use "req=true" or "req=false" if "req" is specified, we are
allowed to tighten the check to enforce that these values are "true"
or "false".
this change serves as part of a sanity check of all command
descriptions, as all command descriptions are formatted into JSON
with the "get_command_description" asok command and the mon command
with the same name. and it does not change the runtime behavior.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
in 46586b22, we introduced the "osd pool application get" command, but
in this command's desc field, we had a typo: "req=fasle". this didn't
cause any issue, because we always consider "true" or "True" as true,
and false otherwise when formatting a command desc into JSON.
but it's still not correct. let's fix this typo.
Fixes: https://tracker.ceph.com/issues/77251
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
The previous patch only injected hostname into the metadata map for OSDs
that were placed under a CRUSH host bucket. For mds/mgr/mon daemons and
for OSDs absent from CRUSH, the original 'state->hostname = ...' line
was removed without a replacement, so update_metadata received a map
with no 'hostname' key. DaemonState::set_metadata only updates
state->hostname when the map carries it, so a daemon restarting on a
different host would be re-inserted in by_server under its stale
hostname.
Always seed m["hostname"] from the metadata-reported hostname, then
prefer the CRUSH host when available. Apply the same shape to the
new-daemon branch so set_metadata uniformly drives state->hostname,
removing the redundant direct assignment.
Reported-by: code review on PR #66757
Signed-off-by: senol.colak <senol.colak@sap.com>
In containerized deployments (e.g. Rook), OSD daemons report the
pod/container hostname. The CRUSH map records the physical host.
This mismatch causes 'ceph device ls' to show pod names instead of
physical hosts, breaking host-based device correlation.
Fix by deriving the CRUSH host bucket name for each OSD and substituting
it as the canonical hostname in all three metadata paths:
- MetadataUpdate::finish (async mon metadata fetch, primary path)
- Mgr::load_all_metadata OSD bulk-load (startup/failover)
- DaemonServer::fetch_missing_metadata (via MetadataUpdate)
The override is a no-op when the OSD is absent from CRUSH or when the
OSD map is not yet available.
Fixes: https://tracker.ceph.com/issues/73080
Signed-off-by: senol.colak <senol.colak@sap.com>
All parameters are C strings (either C literals, except for
MgrMonitor::update_from_paxos()) and there's no point in copying all
of them onto the heap during startup.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Add stub-level information for the documentation of ceph-exporter. Explicit configuration instructions are still missing from this documentation, and should in the future be supplied.
Signed-off-by: Zac Dover <zac.dover@clyso.com>
Specifying the quota or resize for a subvolume requires the value in bytes.
This value can now be accepted as <num><unit>. Also allows floating point numbers.
Fixes: https://tracker.ceph.com/issues/62673
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2026-02-19 10:16:02 +05:30
705 changed files with 28336 additions and 9492 deletions
@ -41,8 +41,7 @@ Make sure X (and, ideally, X+1) is defined:
Github Actions
~~~~~~~~~~~~~~
- [ ] .github/workflows/redmine-upkeep.yml add release branch to pull_request_target trigger
- [ ] .github/workflows/releng-audit.yml add release branch to pull_request_target trigger
- [ ] `.github/workflows/*.yml' add release branch to pull_request_target trigger
Scripts
~~~~~~~
@ -137,6 +136,8 @@ After dev freeze
- [ ] open the Branch Protection settings of the Ceph repo. Duplicate settings to the new release branch.
- [ ] create vX.3.0 annotated tag on ``main`` so upgrades from new release to main are not wrongly considered downgrades.
- [ ] remove ``doc/releases/*.rst``. This should leave behind ``doc/releases/releases.yml`` which is used for doc building purposes. See also commit 33d63c3 ("doc: remove release notes for release branch") for details.
- [ ] remove ``.github/workflows``. ``main`` is authoritative for workflows; avoid possible confusion/conflicts.
- [ ] remove ``.github/pull_request_template.md``. Backports do not use it.
- [ ] cherry-pick 8cf9ad62949516666ad0f2c0bb7726ef68e4d666 ("doc: add releases links to toc"). There will be trivial conflicts.
- [ ] add redirect for new major release at `RTD <https://readthedocs.org/dashboard/ceph/redirects/>`_.
- [ ] add release name to redmine (using https://tracker.ceph.com/custom_fields/16/edit)
This feature adds to RGW the ability to securely cache objects and offload the workload from the cluster, using Nginx.
After an object is accessed the first time it will be stored in the Nginx cache directory.
This feature adds to RGW the ability to securely cache objects and offload the workload from the cluster, using NGINX.
After an object is accessed the first time it will be stored in the NGINX cache directory.
When data is already cached, it need not be fetched from RGW. A permission check will be made against RGW to ensure the requesting user has access.
This feature is based on the Nginx modules ``ngx_http_auth_request_module`` and `nginx-aws-auth-module <https://github.com/kaltura/nginx-aws-auth-module>`_, and OpenResty for Lua capabilities.
This feature is based on the NGINX modules ``ngx_http_auth_request_module`` and `nginx-aws-auth-module <https://github.com/kaltura/nginx-aws-auth-module>`_, and OpenResty for Lua capabilities.
Currently this feature will cache only AWSv4 requests (only S3 requests), caching-in the output of the first GET request
and caching-out on subsequent GET requests, passing through transparently PUT, POST, HEAD, DELETE and COPY requests.
@ -27,9 +27,9 @@ New APIs
There are 2 new APIs for this feature:
- **Auth API:** The cache uses this to validate that a user can access the cached data.
- **Cache API:** Adds the ability to override the ``Range`` header securely so that Nginx can use its own `smart cache <https://www.nginx.com/blog/smart-efficient-byte-range-caching-nginx/>`_ on top of S3.
- **Cache API:** Adds the ability to override the ``Range`` header securely so that NGINX can use its own `smart cache <https://www.nginx.com/blog/smart-efficient-byte-range-caching-nginx/>`_ on top of S3.
Using this API gives the ability to read ahead objects when client is asking a specific range from the object.
On subsequent accesses to the cached object, Nginx will satisfy requests for already-cached ranges from the cache. Uncached ranges will be read from RGW (and cached).
On subsequent accesses to the cached object, NGINX will satisfy requests for already-cached ranges from the cache. Uncached ranges will be read from RGW (and cached).
Auth API
~~~~~~~~
@ -58,7 +58,7 @@ If both checks succeed it will use the ``X-Amz-Cache`` to revalidate that the us
During this flow the RGW will override the ``Range`` header.
Using Nginx with RGW
Using NGINX with RGW
--------------------
Download the source of OpenResty:
@ -67,7 +67,7 @@ Download the source of OpenResty:
It is possible to use `Nginx slicing <https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/#byte-range-caching>`_ which is suitable for streaming purposes.
It is possible to use `NGINX slicing <https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/#byte-range-caching>`_ which is suitable for streaming purposes.
To enable slicing you should use ``nginx-slicing.conf`` instead of ``nginx-default.conf``.
If you do not want to use prefetch caching, it is possible to replace ``nginx-default.conf`` with ``nginx-noprefetch.conf``.
If prefetch caching is disabled Nginx will cache each range request separately and possible overlap in the range requests will be fetched more than once. For example, if a client is sending a range request of 0-4095 and then 0-4096 both requests are fetched completely from RGW.
If prefetch caching is disabled NGINX will cache each range request separately and possible overlap in the range requests will be fetched more than once. For example, if a client is sending a range request of 0-4095 and then 0-4096 both requests are fetched completely from RGW.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.