Adam Kupczyk [Fri, 28 Mar 2025 09:17:15 +0000 (09:17 +0000)]
common/denc.h: Introduce DENC_START_UNCHECKED
This is the variant of DENC_START that manually controls encoding version.
As being incompatible with static compile-time checking of
StructVChecker, new (legacy) mode had to be introduced.
Also,
Removed struct_v and struct_compat from denc_finish.
Adam Kupczyk [Thu, 27 Mar 2025 13:17:36 +0000 (13:17 +0000)]
os/bluestore: Generalize WAL_v2 => envelope_mode
This refactor turns WAL_v2 into globally available ENVELOPE_MODE.
The RocksDB WAL files are now just using existing feature.
Now adding new file encoding schemes will be easier.
Adam Kupczyk [Fri, 28 Feb 2025 14:29:26 +0000 (14:29 +0000)]
test/objectstore: Fix unittest for truncation
The fact that test was broken was hidden by the error
in BlueFS::_init_alloc, that created the allocator with invalid
alloc unit size.
After that was fixed, also test needed to be fixed.
Adam Kupczyk [Mon, 10 Mar 2025 12:15:52 +0000 (12:15 +0000)]
os/bluestore: Refactor of WAL-v2 BlueFS
Main changes:
- remove bluefs_wal_header_t; we no longer use denc directly,
instead we read length and marker directly
- get rid of wal_limit; this is replaced with splitting
WAL_V2=>{WAL_V2,WAL_V2_FIN}. WAL_V2 means there could be more wal data,
WAL_V2_FIN means file was orderly closed = no more data.
- modified wal_marker_t (previously WALMarker) to be calculated in
endiness-agnostic way.
- replaced _wal_update_size with _wal_index_file; it does a similar
function, but is less convoluted now
- simplified _wal_read
- now BlueFS::close_writer() flushes data
- BlueRocksEnv's BlueRocksWritableFile::truncate() now does the action
os/bluestore: Introduce custom format of BlueFS file - WAL
WAL file mode allows to cut by 50% of fdatasync().
For regular files, we independently sync file data and file metadata.
In WAL mode we are able to recover most metadata from file bytestream.
Hence - we only sync file data.
Zac Dover [Thu, 27 Mar 2025 12:24:13 +0000 (22:24 +1000)]
src/common: add guidance for mon_warn_pg_not_scrubbed
Add an explanation of how to set the value of
"mon_warn_pg_not_scrubbed_ratio" to the confval definition of that
variable. Although this variable contains the string "mon", it is set on
the Manager. I have added a note to direct users to set this value on
the Manager.
This issue was pointed out by Petr Tlapa on Slack in late March of 2025.
This issue is part of a small project that also encompasses
https://github.com/ceph/ceph/pull/62459, which is associated with commit aeef59a50ee31072648ba0c7436b6522137614cd
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com> Signed-off-by: Zac Dover <zac.dover@proton.me>
Previously, we relied on the __GNUC__ macro to check for std::atomic<std::shared_ptr>
support, which was inaccurate. This approach failed with Clang builds using libstdc++,
even when the feature was implemented. The warning looks like:
```
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/shared_ptr_atomic.h:131:5: note: 'atomic_load_explicit<std::vector<entity_addrvec_t>>' has been explicitly marked deprecated here
131 | _GLIBCXX20_DEPRECATED_SUGGEST("std::atomic<std::shared_ptr<T>>")
| ^
```
This change uses a standard-compliant feature test macro (__cpp_lib_atomic_shared_ptr)
to correctly detect support for std::atomic<std::shared_ptr>. This resolves compilation
issues and improves portability across different compilers and standard library
implementations.
Ilya Dryomov [Thu, 20 Mar 2025 17:28:44 +0000 (18:28 +0100)]
rbd: mirror_uuids -> mirror_uuid in remote mirror peer listing
... in "rbd mirror image status" and "rbd mirror pool status --verbose"
formatted outputs. In unformatted outputs this value is shown in place
of a name in case a site name isn't available.
Ilya Dryomov [Thu, 20 Mar 2025 16:10:47 +0000 (17:10 +0100)]
rbd: extend use of "none" placeholder to IMAGES section
Currently if there are no mirror-enabled images, IMAGES section
in "rbd mirror pool status --verbose" output isn't terminated:
$ rbd mirror pool status data --verbose
health: OK
daemon health: OK
image health: OK
images: 0 total
DAEMONS
service 4388:
...
health: OK
IMAGES$
DAEMONS section has a "none" placeholder for when there are no
rbd-mirror daemons running. Fix some issues with the separator logic
and employ the placeholder in IMAGES section:
$ rbd mirror pool status data --verbose
health: OK
daemon health: OK
image health: OK
images: 0 total
DAEMONS
service 4388:
...
health: OK
IMAGES
none
$
$ rbd mirror pool status data --verbose
health: UNKNOWN
daemon health: UNKNOWN
image health: OK
images: 0 total
rgw: fix the version in DOCODE_START() of RGWZoneGroupPlacementTier
This commit fixes an undetected merge conflict between PRs #61745
and #60159. The dencoding problem has been introduced very recently,
it is straightforward and causes failures of the make check bot
everywhere, therefore -- if no objections -- I want to merge this
patch without the Teuthology testing.
Kefu Chai [Mon, 24 Mar 2025 02:05:25 +0000 (10:05 +0800)]
librbd: migrate from boost::variant to std::variant
migrate from boost::variant to std::variant
Complete migration started in commit 017f3339c, replacing boost::variant with
std::variant throughout the librbd codebase. This change is part of our ongoing
effort to reduce third-party dependencies by leveraging C++ standard library
alternatives where possible.
Benefits include:
- Improved code readability and maintainability
- Reduced external dependency surface
- More consistent API usage with other components
Aashish Sharma [Tue, 25 Mar 2025 11:35:05 +0000 (17:05 +0530)]
mgr/dashboard: fix image filter's query on rbd-details grafana panel
The image filter on the RBD Details grafana panel is using a query with a type "label_values(ceph_rbd_read_ops{cluster=~\"$cluster\", , pool=\"$pool\"}, image)". The extra comma needs to be removed.
Ilya Dryomov [Tue, 25 Mar 2025 08:13:27 +0000 (09:13 +0100)]
mgr/rbd_support: always parse interval and start_time in Schedules::remove()
Commit 1b62447071a9 ("mgr/rbd_support: fix schedule remove") addressed
the issue that it was concerned with in a rather suboptimal way: instead
of moving the parsing of interval and start_time upfront to be able to
bail early, it wrapped from_string() constructors with try/finally and
left the conditional behavior in place.
Kefu Chai [Tue, 25 Mar 2025 04:17:35 +0000 (12:17 +0800)]
common: remove spaces before literal operator
clang 20 complains when compiling a user-defined literal operator
with spaces before the underscore. so let's drop the space to be
compliant to
[CWG2521](https://cplusplus.github.io/CWG/issues/2521.html).
```
/home/kefu/dev/ceph/src/common/options.h:415:41: warning: identifier '_min' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
415 | constexpr unsigned long long operator"" _min (unsigned long long min) {
| ~~~~~~~~~~~^~~~
| operator""_min
```
Patrick Donnelly [Mon, 24 Mar 2025 15:50:50 +0000 (11:50 -0400)]
mgr: add status command
The Rook operator relies on a `status` (asok) command to the mgr to verify it
is operational. However, this command was actually served by the CephFS
`Client` library that the ceph-mgr daemon statically linked in and used for
sending MDS commands. That statically linked client was removed via 048fc68c
(case insensitive directory tree feature).
So, add a legitimate ceph-mgr status command which simply outputs an empty
dictionary and returns success (0). TBD on adding useful information.
Fixes: 048fc68c517f50b9978457f478ca4638f01caa09 Fixes: https://tracker.ceph.com/issues/70571 Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>