Zac Dover [Mon, 23 Jun 2025 08:18:07 +0000 (18:18 +1000)]
doc/radosgw: remove "pubsub_event_lost"
Remove "pubsub_event_lost" from the list of "Notification Performance
Statistics" in doc/radosgw/notifications.rst. "pubsub_event_lost" is now
obsolete.
Nitzan Mordechai [Wed, 21 May 2025 11:41:01 +0000 (11:41 +0000)]
src/mon/MgrStatMonitor: fix invalid iterator increment in calc_pool_availability()
Erasing entries from `pool_availability` inside a range-for
loop invalidated the hidden iterator, triggering an
“Invalid read” under Valgrind.
- Use `std::erase_if(pool_availability, predicate)` for
atomic removal.
- Refactor the stats-update loop to use structured bindings
and a clear `++it` for readability.
John Mulligan [Fri, 20 Jun 2025 23:03:22 +0000 (19:03 -0400)]
script/build-with-container: add rocky10 to built-in distros
Add "rocky10" (also aliased to "rockylinux10") to the known distro bases
so that the team can begin to experiment with the Rocky Linux 10 distro
for containerized builds.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Fri, 20 Jun 2025 23:46:16 +0000 (19:46 -0400)]
script/build-with-container: support --build-arg arguments
Allow passing --build-arg arguments to build-with-container.py
which are passed directly to the container build command.
This allows a developer to toggle certain features of the build
container, however this should not be used in CI.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Fri, 20 Jun 2025 23:34:45 +0000 (19:34 -0400)]
Dockerfile.build: make WITH_CRIMSON a build arg
We've chosen to enable crimson by default to match the CI, but that
is not always something a developer may want, so make WITH_CRIMSON
a build argument that can be toggled off if necessary.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Kefu Chai [Fri, 20 Jun 2025 23:00:01 +0000 (07:00 +0800)]
common/static_ptr: pass an integer to alignas to fix GCC-11 build failure
GCC-11 fails to compile `alignas(std::bit_ceil(Size))` despite std::bit_ceil()
being marked constexpr in libstdc++11. The compiler doesn't recognize it as a
constant expression, while GCC-12+ and Clang-14+ handle it correctly.
Define the alignment value as a separate constexpr variable before passing it
to alignas() to ensure compatibility with GCC-11.
Fixes compilation issue introduced in commit 73399b05 when std::aligned_storage_t
was replaced with alignas.
J. Eric Ivancich [Fri, 20 Jun 2025 20:00:54 +0000 (14:00 -0600)]
Merge pull request #63271 from rafaelweingartner/parameter_to_externalize_secret_key_ttl-upstream-2
rgw: Externalize Keystone secret key cache TTL
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Adam C. Emerson <aemerson@redhat.com> Reviewed-by: Tobias Urdin <tobias.urdin@binero.com>
Replace contains() + at() pattern with single find() call to avoid
double lookup overhead. Previously checked map.contains(key) then
used map.at(key), which performs two hash table lookups for the
same operation.
Now uses map.find() and checks the returned iterator against end(),
accessing the value directly from the iterator when found.
Kefu Chai [Fri, 20 Jun 2025 07:56:26 +0000 (15:56 +0800)]
osd/ECExtentCache: convert LRU::Key from class to struct
Change Key from a class with public members and constructor to a
plain struct. Since Key only holds data with no special initialization
logic, a struct with aggregate initialization is more appropriate
and simpler.
This removes the user-declared constructor and relies on the compiler's
default aggregate initialization from initializer lists.
Kefu Chai [Fri, 20 Jun 2025 07:31:56 +0000 (15:31 +0800)]
osd/ECExtentCache: use default-generated comparison operators
Replace manually implemented operator== and operator!= for Key with
compiler-generated defaults. In C++20, comparison operators can be
explicitly defaulted, and the generated behavior is identical to our
hand-crafted implementation.
This simplifies the code by letting the compiler handle operator
generation automatically.
Kefu Chai [Fri, 20 Jun 2025 07:23:00 +0000 (15:23 +0800)]
osd/ECExtentCache: Replace manual mutex operations with std::lock_guard
Replace manual mutex.lock() and mutex.unlock() calls with std::lock_guard
for LRU cache access serialization. This improves code safety by ensuring
automatic unlock on scope exit and reduces maintenance burden compared to
manual mutex management.
Ronen Friedman [Thu, 19 Jun 2025 15:27:38 +0000 (10:27 -0500)]
osd/scrub: clarify that osd_scrub_auto_repair_num_errors counts objects
'osd_scrub_auto_repair_num_errors' limits the number of damaged objects
that we will try to auto-repair during a scrub. Its documentation
referred to "number of errors", which did not fit the implementation.
Fixes: https://tracker.ceph.com/issues/71754 Fixes: Red Hat BZ2316244 Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Jon [Thu, 19 Jun 2025 14:16:36 +0000 (15:16 +0100)]
test/osd: Make error messages that occur based on configuration problems or user error more readable in ceph_test_rados_io_sequence
Move away from using ceph_abort for error messages that occur from configuration issues and user error to printing to std::error as it is not necissairy to produce a call stack and core dumps in these cases and much better to give an easily readable message to the user.
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
Jon [Thu, 19 Jun 2025 14:14:04 +0000 (15:14 +0100)]
test/osd: Add erasure code plugins as a dependancy of ceph_test_rados_io_sequence
ceph_test_rados_io_sequence uses the plugins for determining erasure code values for testing, so we want these to be built as a dependancy of the application when built in isolation
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
Kefu Chai [Thu, 19 Jun 2025 10:04:05 +0000 (18:04 +0800)]
rgw: avoid using std::aligned_storage_t
std::aligned_storage_t was deprecated in C++23, to be prepared for it,
let's use alignas for the same behavior. because the 3 * 8 (with LP64
data model) is not power-of-2, while `alignas()` requires an alignment
of power of 2. so we use `std::bit_ceil()` to calculate the minimum
alignment greater or equal to this number.
Kefu Chai [Thu, 19 Jun 2025 09:50:15 +0000 (17:50 +0800)]
common/static_ptr: avoid using std::aligned_storage_t
std::aligned_storage_t was deprecated in C++23, to be prepared for it,
let's use alignas for the same behavior. because the size of `Base`
class is not always power-of-2, while `alignas()` requires an alignment
of power of 2. so we use `std::bit_ceil()` to calculate the minimum
alignment greater or equal to its size.
Kefu Chai [Thu, 19 Jun 2025 08:52:59 +0000 (16:52 +0800)]
neorados: avoid using std::aligned_storage_t
std::aligned_storage_t was deprecated in C++23, to be prepared for
it, let's use alignas for the same behavior. because we do not always
pass a power-of-2 number to `std::aligned_storage_t`, while `alignas()`
requires an alignment of power of 2. so we use `std::bit_ceil()` to
calculate the minimum alignment greater or equal to the given number.
Venky Shankar [Tue, 20 May 2025 12:19:41 +0000 (12:19 +0000)]
client: do not check file size when inode does not have Fc caps
Since the client is holding Fr caps, the read request can be
directly sent to the OSD. The offset/in->size comparison check
is causing the read request to return with no data since in->size
isn't yet updated when another client does an extending write.
Kefu Chai [Thu, 19 Jun 2025 08:19:04 +0000 (16:19 +0800)]
common/io_exerciser: fix buffer overread in DataGenerator
Fix GCC-15 warning about reading uninitialized memory when copying
random data to fill remaining bytes in generated blocks.
The issue occurred when remainingBytes exceeded the 8-byte size of
the uint64_t rand1 variable, causing memcpy to read beyond the
variable's boundary. While this didn't cause crashes (reading from
stack) and the buffer was still properly filled with rand2, it
violated memory safety and generated compiler warnings.
Fixed by limiting the copy size to the actual size of the source
variable (sizeof(rand1)) to ensure we only read initialized memory.
Resolves GCC-15 warnings:
- DataGenerator.cc:76: memcpy reading 9-15 bytes from 8-byte region
- DataGenerator.cc:108: memcpy reading 9-15 bytes from 8-byte region
Currently, we use the "Check ceph config" CI check to remind users about
any configuration changes that were detected in the PR. There's no easy
way for the script to detect if the relevant docuemtations has been
updated for the config change that was detected.
Users might get confused to still see the CI check failing even after
updating the relevant docs. We update the text message to help diffuse
the confusion. If the users will still like to see the CI check go green
- they can comment `/config check ok` and re-run the failed test.