Kefu Chai [Tue, 13 Jan 2026 01:19:17 +0000 (09:19 +0800)]
common/options: fix heap-use-after-free by using never-destroyed static
The config schema map was using string_view keys that pointed to the
name field of Option objects stored in the global ceph_options vector.
When the vector is destroyed during program exit, the Option objects
are freed, but background threads (like BlueStore::MempoolThread) may
still be accessing config options, causing use-after-free.
ASan reported:
READ of size 19 at 0x503000047c80 thread T411
#12 md_config_t::find_option(std::string_view) const config.cc:261
#17 BlueStore::MempoolThread::entry() BlueStore.cc:5591
0x503000047c80 is located 0 bytes inside of 20-byte region
freed by thread T0 here:
#7 Option::~Option() options.h:15
#13 std::vector<Option>::~vector() stl_vector.h:730
#14 __run_exit_handlers stdlib/exit.c:113
Fix by converting ceph_options from a global variable to a function
get_ceph_options() that returns a reference to a static pointer that
is never destroyed. This ensures the Option objects remain valid for
the lifetime of the program, even during exit when background threads
may still be accessing them.
This preserves the memory efficiency of using string_view keys in the
schema map while fixing the lifetime issue.
Ville Ojamo [Fri, 9 Jan 2026 09:45:59 +0000 (16:45 +0700)]
doc/cephadm: small improvements continued
Fix invalid section title and add a label for ref.
Link to the new label instead of telling which section to read.
Remove a sentence no longer relevant with config db.
Remove stray spaces, add newlines per style, fix capitalization.
Use privileged prompt when necessary.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Fri, 9 Jan 2026 10:21:13 +0000 (17:21 +0700)]
doc/cephadm: small improvements to upgrade.rst
Reorganize and split long text paragraphs.
Add a label for ref instead of using section title name.
Fix word capitalization and minor changes to words.
Use title case consistently in section titles.
Use double backticks consistently for literal strings.
Use confval role instead of literal inline for config keys in text.
Improve markup. Improve prompt usage.
Delete spaces at end of lines. Wrap long lines.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Fri, 9 Jan 2026 09:59:41 +0000 (16:59 +0700)]
doc/cephadm: small improvements to troubleshooting.rst
Programmatically add fsid to example script instead of telling user to add it.
Re-organize CLI example and output that was all on the same line.
Use title case consistently in section titles.
Use the standard style section title levels markup and preceding newlines.
Use double backticks consistently for literal strings.
Improve markup. Improve prompt usage.
Fix word capitalization and minor changes to words.
Delete spaces at end of lines.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Kefu Chai [Fri, 9 Jan 2026 04:40:39 +0000 (12:40 +0800)]
rgw/dbstore: fix memory leaks in unittest_dbstore_tests
Fix memory leaks detected by AddressSanitizer in unittest_dbstore_tests.
The test was failing with ASan enabled due to SQLObjectOp objects not
being properly cleaned up.
ASan reported the following leaks:
Direct leak of 200 byte(s) in 1 object(s) allocated from:
#0 operator new(unsigned long)
#1 SQLGetBucket::Execute(DoutPrefixProvider const*, rgw::store::DBOpParams*)
/src/rgw/driver/dbstore/sqlite/sqliteDB.cc:1689
#2 rgw::store::DB::ProcessOp(DoutPrefixProvider const*, ...)
/src/rgw/driver/dbstore/common/dbstore.cc:258
Direct leak of 200 byte(s) in 1 object(s) allocated from:
#0 operator new(unsigned long)
#1 SQLInsertBucket::Execute(DoutPrefixProvider const*, rgw::store::DBOpParams*)
/src/rgw/driver/dbstore/sqlite/sqliteDB.cc:1433
#2 rgw::store::DB::ProcessOp(DoutPrefixProvider const*, ...)
/src/rgw/driver/dbstore/common/dbstore.cc:258
SUMMARY: AddressSanitizer: 460550 byte(s) leaked in 1823 allocation(s).
Root cause: The DB::Destroy() method had an early return when the db
pointer was NULL, preventing cleanup of the objectmap which stores
SQLObjectOp pointers. These objects were allocated during test execution
but never freed.
Changes:
- Modified DB::Destroy() to always clean up objectmap even when db is NULL
- Added explicit delete in objectmapDelete() for consistency
- Added lsan suppression for SQLite internal allocations (indirect leaks)
After the fix, all direct leaks are eliminated. Only indirect leaks from
SQLite's internal memory management remain, which are now suppressed.
Test results:
- Before: 460,550 bytes leaked (including 2 direct leaks of 200 bytes each)
- After: 0 direct leaks, unittest_dbstore_tests passes with ASan
Kefu Chai [Thu, 8 Jan 2026 23:43:13 +0000 (07:43 +0800)]
cmake: guard unittest_global_doublefree with WITH_LIBCEPHFS
The unittest_global_doublefree test detects double-free issues in
global static variables when an executable links both librados and
libcephfs. However, it was incorrectly guarded by WITH_CEPHFS (which
controls the server-side cephfs components) instead of WITH_LIBCEPHFS
(which controls the client library it actually depends on).
This causes build failures when building with WITH_LIBCEPHFS enabled
but WITH_CEPHFS disabled:
```
/usr/bin/ld: cannot find -lcephfs: No such file or directory
```
Change the guard to WITH_LIBCEPHFS to match the actual dependency.
While this scenario is uncommon (most users enable WITH_CEPHFS), the
fix correctly aligns the build logic with the test's dependencies.
Kefu Chai [Fri, 9 Jan 2026 01:25:28 +0000 (09:25 +0800)]
test/osd: fix buffer alignment issue in unittest_ecbackend
The create_buf() function in TestECBackend.cc had two issues that
caused test failures when running with ASan enabled:
1. Infinite loop potential: When std::rand() % 5 returned 0, len_to_add
would be 0, causing an infinite loop if the buffer hadn't reached
the target length yet.
2. Memory alignment issue: Using append_zero() doesn't guarantee that
the resulting buffer's memory address is aligned to EC_ALIGN_SIZE
(4096 bytes). The is_aligned() check verifies that all buffers in
the bufferlist have their data pointers properly aligned, not just
that the length is a multiple of the alignment size.
Fix by:
- Changing std::rand() % 5 to std::rand() % 5 + 1 to ensure we always
allocate 1-5 pages worth of data, avoiding the infinite loop
- Replacing append_zero() with buffer::create_page_aligned() followed
by memset() and append(), which ensures each buffer has its data
pointer aligned to page boundaries (4096 bytes)
This ensures the test passes consistently with ASan enabled.
gal salomon [Thu, 8 Jan 2026 18:46:55 +0000 (18:46 +0000)]
rgw/d4n: passing the dpp to RedisPool::acquire to fix nullptr crash
Fix segfault when Redis connection pool is exhausted by passing the DoutPrefixProvider parameter through redis_exec_cp() to acquire(),
preventing null reference in maybe_warn_about_blocking()
Signed-off-by: gal salomon <gal.salomon@gmail.com>
Imran Imtiaz [Wed, 24 Dec 2025 10:14:53 +0000 (10:14 +0000)]
mgr/dashboard: add CRUD API endpoints for consistency group snapshots 2/2
Signed-off-by: Imran Imtiaz <imran.imtiaz@uk.ibm.com> Fixes: https://tracker.ceph.com/issues/74275
Create a consistency group dashboard API endpoint to:
Ville Ojamo [Thu, 8 Jan 2026 09:44:26 +0000 (16:44 +0700)]
doc/cephadm: small improvements to operations.rst
Remove "*" around CLI command placeholders that was rendered in literal strings.
Leave only the usual "<placeholder>" string.
Use title case consistently in section titles.
Add links to more information.
Move a label about logs to the right section.
Use double backticks consistently for literal strings.
Use confval role instead of literal inline for config keys in text.
Fix word capitalization and minor changes to words.
Use Monitor, Manager, etc. instead of MON, MGR, etc.
Improve markup. Improve prompt usage.
Fix duplicate text and remove an unnecessary section.
Delete spaces at end of lines. Add full stops or colons.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Thu, 8 Jan 2026 07:55:00 +0000 (14:55 +0700)]
doc/cephadm: small improvements to install.rst
Remove "*" around CLI command placeholders that was rendered in literal strings.
Leave only the usual "<placeholder>" string.
Use title case consistently in section titles.
Use confval role instead of literal inline for config keys in text.
Improve markup.
Use ref instead of full URL for intradocs link.
Remove unused external link definition.
Fix double prompts in SSH cert auth section.
Fix word capitalization and minor changes to words.
Use Monitor, Manager, etc. instead of MON, MGR, etc.
Fix hyphenation.
Use underscores in config key name.
SSH cert auth uses a signed public, not private, key.
Delete spaces at end of lines. Add full stops or colons.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Thu, 8 Jan 2026 07:26:20 +0000 (14:26 +0700)]
doc/cephadm: small improvements to host-management.rst
Remove "*" around CLI command placeholders that was rendered in literal strings.
Leave only the usual "<placeholder>" string.
Use title case consistently in section titles.
Add links to more information.
Use double backticks consistently for literal strings.
Use confval role instead of literal inline for config keys in text.
Improve markup.
Fix word capitalization and minor changes to words.
Use Monitor, Manager, etc. instead of MON, MGR, etc.
Reword to "a command of the following form" where suitable.
Fix hyphenation.
Clarify three sentences.
SSH cert auth uses a signed public, not private, key.
Delete spaces at end of lines. Add full stops or colons.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Thu, 8 Jan 2026 06:13:51 +0000 (13:13 +0700)]
doc/cephadm: small improvements to services/index.rst
Remove "*" around CLI command placeholders that was rendered in literal strings.
Leave only the usual "<placeholder>" string.
Use the standard style section title preceding newlines.
Use double backticks consistently for literal strings.
Rewrap only excessively long lines only in certain places to avoid excessive diff.
Use confval role instead of literal inline for config keys in text.
Improve markup.
Fix word capitalization and minor changes to words.
Use Monitor, Manager, etc. instead of MON, MGR, etc.
Reword to "a command of the following form" where suitable.
Remove repetition in admonition about daemon status refresh.
Delete spaces at end of lines. Add full stops or colons.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Thu, 8 Jan 2026 05:38:35 +0000 (12:38 +0700)]
doc/cephadm: small improvements
Remove "*" around CLI command placeholders that was rendered in literal strings.
Leave only the usual "<placeholder>" string.
Use title case consistently in section titles.
Use the standard style section title levels markup and preceding newlines.
Add links to more information.
Use double backticks consistently for literal strings.
Rewrap only excessively long lines only in certain places to avoid excessive diff.
Improve markup.
Fix word capitalization and minor changes to words.
Use Monitor, Manager, etc. instead of MON, MGR, etc.
Reword to "a command of the following form" where suitable.
Delete spaces at end of lines. Add full stops or colons.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ronen Friedman [Thu, 1 Jan 2026 14:35:33 +0000 (14:35 +0000)]
scripts/build/ceph.spec.in: fix rhel version checks
Fixing multiple instances in this file where
the RHEL version is checked - without properly
ensuring that the OS is indeed RHEL.
0%{?rhel} is only defined on RHEL systems, and
is '0' otherwise. That resulted, for example, in
Fedora 43 having 'gts_version' incorrectly
set to '13'.
Afreen Misbah [Tue, 6 Jan 2026 10:47:16 +0000 (16:17 +0530)]
mgr/dashboard: Add full page tearsheet component
Fixes https://tracker.ceph.com/issues/74327
- added "full" page tearsheet
- the full page tearsheet uses a cancel confirmation modal hence added that as well
- as per latest carbon guidelines for tearsheet https://carbondesignsystem.com/community/patterns/create-flows/#anatomy-of-a-full-page
- not added - influencer title and toggle (should be added as per reqs)
Afreen Misbah [Mon, 29 Dec 2025 04:51:36 +0000 (10:21 +0530)]
mgr/dashboard: Add generic wizard component
Fixes https://tracker.ceph.com/issues/74291
- made on top of carbon modal
- carbon design system used - wide tearsheet
- added a step component as well to support navigation code
- added unit tests
Thomas Lamprecht [Wed, 17 Dec 2025 16:28:11 +0000 (17:28 +0100)]
systemd services: fix installing ceph-volume@
The ceph-volume@ service uses the @CMAKE_INSTALL_PREFIX@, so we cannot
just install it directly like the target units, but need to process it
like all other units that are referring to actual executables that
reside in build-target dependent paths.
Fixes: 68c72c5dff5 ("systemd: use CMake install prefix in templates") Reported-by: Daniel Herzig <d.herzig@proxmox.com> Reported-by: Aaron Lauterer <a.lauterer@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Kefu Chai [Tue, 23 Dec 2025 03:19:12 +0000 (11:19 +0800)]
cmake: clarify WITH_CRIMSON help text
The help text for WITH_CRIMSON previously read "Build seastar
components", which referenced the underlying C++ framework rather
than the user-facing functionality. This was confusing because users
care about Ceph features, not implementation details.
Change the help text to reference "Crimson" directly and explicitly
state the default value, making the option's purpose clearer to users.
As the requested Wheel for 'rstcheck==3.3.1' is not available
for Fedora 43:
Fedora 43 ships with Python 3.14 as the default interpreter.
rstcheck 3.3.1 doesn't support Python 3.14 (see supported
versions at https://pypi.org/project/rstcheck/3.3.1/)
rstcheck 6.2.0 was the first version to add Python 3.14 support
(release info: https://pypi.org/project/rstcheck/6.2.0/)
Ville Ojamo [Mon, 5 Jan 2026 06:10:45 +0000 (13:10 +0700)]
doc: Remove sphinxcontrib-seqdiag Python package from RTD builds
This is a proactive PR to avoid breaking docs builds when Setuptools 81
starts to be used in the RTD builds process.
The sphnixcontrib-seqdiag Python package is not compatible with
Setuptools 81 or later due to use of pkg_resources:
https://setuptools.pypa.io/en/latest/pkg_resources.html
Setuptools 81 release should be imminent, with the Python deprecation
warning stating pkg_resources "removal as early as 2025-11-30".
Seqdiag seems to be unmaintained with the latest update at Pypi in
the year 2021 and also no updates to the seqdiag git repo.
There are no seqdiag directives left in the docs after last seqdiags
were removed in PR #52308.
Two other options would exist for fixing the situation (see PR for
discussion) but this seems to be the suitable one.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Mon, 5 Jan 2026 05:46:08 +0000 (12:46 +0700)]
doc/rados: Fix Sphinx warnings in troubleshooting/log-and-debug.rst
Possibly controversial Sphinx fixes:
Fix two Sphinx warnings about more than one confval directive.
Remove the dupe confval directives from log-and-debug.rst and leave only
in mon-config-ref.rst because it has the only copy of a related clog
configuration value mon_health_to_clog_tick_interval.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Kefu Chai [Wed, 31 Dec 2025 09:01:43 +0000 (17:01 +0800)]
common/options: document log_to_stderr's conditional default value
The default value of `log_to_stderr` varies depending on whether Ceph
runs as a daemon or a library. Previously, this was only documented via
the `default` property, which led to confusion when debugging client
applications.
For example, when debugging a CephFS client, setting `debug <subsystem> = 5`
in the configuration file doesn't produce visible debug logs as expected.
This occurs because `common_preinit()` overrides `log_to_stderr` to `false`
when Ceph runs as a library, preventing logs from appearing on stderr.
This commit adds clarification to the `long_desc` field to document this
conditional behavior and help users understand why debug output may not
appear in client scenarios.
Aashish Sharma [Wed, 10 Dec 2025 10:41:50 +0000 (16:11 +0530)]
mgr/dashboard: fix multi-cluster context switcher
The multi-cluster context switcher stopped working because of a
regression caused by this PR https://github.com/ceph/ceph/pull/66034.
This PR tends to fix this issue
Afreen Misbah [Mon, 15 Dec 2025 15:53:44 +0000 (21:23 +0530)]
'mgr/dashboard: Fix display of IP address in host page
- Hosts data is getting merged with hosts' facts which is not sending address hence not getting displayed in UI
- The value is empty hence in the API
- Caused by https://github.com/ceph/ceph/pull/65102