Kefu Chai [Wed, 21 May 2025 03:38:47 +0000 (11:38 +0800)]
osd: migrate from boost::variant to std::variant
Replace boost::variant with std::variant throughout the OSD-related
codebase. This change reduces third-party dependencies by leveraging
the C++ standard library alternative.
Changes:
- common/inline_variant.h: Replace the existing match() helper with a
wrapper around std::visit. The previous implementation constructed a
visitor class from given functions; the new implementation provides
equivalent functionality using standard library primitives.
- osd/osd_types.h: Add templated operator<< overload for std::variant.
Since boost::variant provided a built-in operator<< that we relied on,
and std::variant does not include this functionality, we implement our
own formatter. To avoid ambiguous overload resolution (where types
implicitly convertible to variant alternatives could match both the
variant formatter and their native formatters), the template requires
at least one alternative type parameter.
This migration maintains existing functionality while eliminating the
boost::variant dependency.
Patrick Donnelly [Mon, 14 Jul 2025 15:46:23 +0000 (11:46 -0400)]
script/redmine-upkeep: codify commit abbreviation
As it can vary depending on repository size. On my development machine, it
produces 8 character abbreviations but the github action is producing 7
character abbreviations. This triggers unnecessary updates.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Clang relies on the system's libstdc++ headers for standard C++
features. On Ubuntu Jammy, gcc-11 is the default and it's libstdc++ is
missing some of the newer features supported by C++20.
This causes build failures as certain standard headers are incomplete.
To fix this, we install gcc-12 explicitly so that Clang can pick up the
newer libstdc++ headers.
Kefu Chai [Mon, 30 Jun 2025 07:54:14 +0000 (15:54 +0800)]
cmake: remove osdc/error_code.cc from osdc to fix ODR violation
Fix AddressSanitizer ODR (One Definition Rule) violation caused by
osdc/error_code.cc being compiled into both the osdc library and
ceph-common library.
The violation occurred because osdc_error_category was defined in
both the rbd binary (via osdc) and libceph-common.so, creating
duplicate symbols at runtime.
Since all targets that link against osdc also link against
ceph-common, removing osdc/error_code.cc from osdc doesn't break the
build while eliminating the duplicate definition.
ASan error sample:
```
==857433==ERROR: AddressSanitizer: odr-violation (0x5612ad665760):
[1] size=22 'typeinfo name for osdc_error_category' /home/jenkins-build/build/workspace/ceph-pull-requests/src/osdc/error_code.cc in /home/jenkins-build/build/workspace/ceph-pull-requests/build/bin/rbd
[2] size=22 'typeinfo name for osdc_error_category' /home/jenkins-build/build/workspace/ceph-pull-requests/src/osdc/error_code.cc in /home/jenkins-build/build/workspace/ceph-pull-requests/build/lib/libceph-common.so.2
These globals were registered at these points:
[1]:
#0 0x5612acd62c88 in __asan_register_globals (/home/jenkins-build/build/workspace/ceph-pull-requests/build/bin/rbd+0x815c88) (BuildId: 62a02cbbf3426e5470e16372e3b53a18cb18ce0f)
#1 0x5612acd63d59 in __asan_register_elf_globals (/home/jenkins-build/build/workspace/ceph-pull-requests/build/bin/rbd+0x816d59) (BuildId: 62a02cbbf3426e5470e16372e3b53a18cb18ce0f)
#2 0x7f28d3b02eba in call_init csu/../csu/libc-start.c:145:3
#3 0x7f28d3b02eba in __libc_start_main csu/../csu/libc-start.c:379:5
```
- clipboard icon not displaying breaking several places
- cliboard icon on click gets filed primary green color losing the visibilty of icon. The icon now remain visible on click
- clipboard button for path and copy in tables on mouseover does not give `hand` but `cursor`. which was not ideal from a usability standpoint. This behavior has been updated to use the hand cursor making the interaction semantically correct and more intuitive for users.
Naman Munet [Mon, 7 Jul 2025 09:26:49 +0000 (14:56 +0530)]
mgr/dashboard: differentiate account users from rgw users in bucket form
fixes: https://tracker.ceph.com/issues/71523
commit includes:
1) Added checkbox to select account user and another dropdown to show account users
2) Also fixed bucket replication as it was throwing error for 'invalidBucketARN'
Alex Ainscow [Wed, 11 Jun 2025 15:24:12 +0000 (16:24 +0100)]
osd: Remove all references to hinfo from optimized EC
Legacy EC used hinfo to store two things:
1. Shard size
2. CRCs of the shards
However:
* Optimized EC stores different object sizes on each shard
* Optimized EC scrub calculates the correct sizes of shards and checks them, so shard size checks are not needed in hinfo.
* Bluestore checks the CRC.
* Seastore checks the CRC.
As such, the hinfo object is redundant. As such we remove it in
optimized EC:
1. Remove all references/upgrades to hinfo.
2. Delete hinfo attribute if found on recovery/backfill.
3. Redirect all scrub references for hinfo to legacy EC.
Kefu Chai [Fri, 27 Jun 2025 13:56:23 +0000 (21:56 +0800)]
erasure-code/jerasure: fix memory leak in Galois field operations
Fix a memory leak where Galois field acceleration functions created by
ErasureCodeJerasure::prepare() were never freed. ASan detected this as
a one-time leak when the plugin was unloaded.
Add jerasure_finish() destructor function in jerasure_init.cc to free
the allocated Galois field operations. Since jerasure_init.cc and
galois.c are built into the same object library, jerasure_finish() can
access and clean up the global static acceleration functions defined
in galois.c.
The destructor function is automatically called when the shared library
(plugin) is unloaded, ensuring proper cleanup without requiring explicit
calls from client code.
Nizamudeen A [Tue, 8 Jul 2025 13:37:35 +0000 (19:07 +0530)]
mgr/prometheus: fix metrics service not coming up
https://github.com/ceph/ceph/pull/61468 unintentionally broke the http
metric service while it removed the code that starts the metrics. adding
them back up.
seastore: support validating device signature for ceph-lvm
Write the SEASTORE_SUPERBLOCK_SIGN at offset 0 before
encoding the superblock. If the signature is added inside
the block_sm_superblock_t structure (via DENC), it won't be
written at offset 0 because DENC encoding add some metadata.
Therefore prepend the signature to the bufferlist before
encoding the superblock sothat signature always appears at the
start of the written data
qa/standalone/scrub: fix "scrubbed in 0ms" in osd-scrub-test.sh
The specific test looks for a 'last scrub duration' higher than
0 as a sign that the scrub actually ran. Previous code fixes
guaranteed that even a scrub duration as low as 1ms would be
reported as "1" (1s). However, none of the 15 objects created
in this test were designated for the tested PG, which remained
empty. As a result, the scrub duration was reported as "0".
The fix is to create a large enough number of objects so that
at least one of them is mapped to the tested PG.
Warning: Encountered an error when evaluating display name ${{ format('python3 ceph/src/script/redmine-upkeep.py --github-action --git-dir=./ceph/ {0} {1}
', github.event_name == 'workflow_dispatch' && (inputs.debug && '--debug' || '') || '', github.event_name == 'workflow_dispatch' && format('--limit={}', inputs.limit) || '') }}. The template is not valid. .github/workflows/redmine-upkeep.yml (Line: 54, Col: 14): The following format string is invalid: --limit={}
Error: The template is not valid. .github/workflows/redmine-upkeep.yml (Line: 54, Col: 14): The following format string is invalid: --limit={}
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>