cmake: convert erasure_code and json_spirit to OBJECT libraries
Changes
- convert erasure_code and json_spirit to OBJECT libraries
- do not link erasure unittests against erasure_code which has been
already included by ceph-common. otherwise we'd have two copies of
erasure_code in these unit test executables. this violates the ODR,
and leds to undefined behaviors like segment fault as static variables
would be destructed twice.
This resolves a circular dependency issue where:
- ceph-common was linked against erasure_code and json_spirit static libraries
- These static libraries were incorrectly marked PUBLIC, causing executables
linking against ceph-common to also link against them directly
- The static libraries themselves referenced symbols from ceph-common,
creating an unresolvable circular dependency
The circular dependency manifested as linker errors in tests like
ceph_test_ino_release_cb, where libjson_spirit.a and liberasure_code.a
contained undefined references to ceph-common symbols (e.g.,
ceph::__ceph_assert_fail and get_str_list) that couldn't be resolved
due to the linking order.
By converting these to OBJECT libraries, we ensure their object files
are incorporated directly into ceph-common during linking, breaking
the circular dependency and preventing the public propagation of
these dependencies to downstream targets.
For instance, ceph_test_ino_release_cb failed to link, because it was
linked against libjson_spirit.a:
```
/usr/bin/c++ -g -O2 -ffile-prefix-map=/home/kefu/dev/ceph=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -rdynamic -Wl,--dependency-file=CMakeFiles/ceph_tes
t_ino_release_cb.dir/link.d CMakeFiles/ceph_test_ino_release_cb.dir/test_ino_release_cb.cc.o -o ../../../bin/ceph_test_ino_release_cb -Wl,-rpath,/home/kefu/dev/ceph/obj-x86_64-linux-gnu/lib: ../../../lib/libcephfs.so.2.0.0 ../../../lib/libceph-common.so.
2 ../../../lib/libjson_spirit.a ../../../lib/libcommon_utf8.a ../../../lib/liberasure_code.a ../../../lib/libextblkdev.a -lcap -lresolv ../../../boost/lib/libboost_thread.a ../../../boost/lib/libboost_chrono.a ../../../boost/lib/libboost_atomic.a ../../..
/boost/lib/libboost_system.a ../../../boost/lib/libboost_random.a ../../../boost/lib/libboost_program_options.a ../../../boost/lib/libboost_date_time.a ../../../boost/lib/libboost_iostreams.a ../../../boost/lib/libboost_regex.a ../../../lib/libfmt.a /usr/
lib/x86_64-linux-gnu/libblkid.so /usr/lib/x86_64-linux-gnu/libcrypto.so -ldl /usr/lib/x86_64-linux-gnu/libudev.so /usr/lib/x86_64-linux-gnu/libibverbs.so /usr/lib/x86_64-linux-gnu/librdmacm.so /usr/lib/x86_64-linux-gnu/libz.so ../../opentelemetry-cpp/sdk/
src/trace/libopentelemetry_trace.a ../../opentelemetry-cpp/sdk/src/resource/libopentelemetry_resources.a ../../opentelemetry-cpp/sdk/src/common/libopentelemetry_common.a ../../opentelemetry-cpp/exporters/jaeger/libopentelemetry_exporter_jaeger_trace.a ../
../opentelemetry-cpp/ext/src/http/client/curl/libopentelemetry_http_client_curl.a /usr/lib/x86_64-linux-gnu/libcurl.so /usr/lib/x86_64-linux-gnu/libthrift.so ../../breakpad_project-prefix/lib/libbreakpad_client.a -Wl,--as-needed -latomic
make -f src/test/msgr/CMakeFiles/ceph_perf_msgr_client.dir/build.make src/test/msgr/CMakeFiles/ceph_perf_msgr_client.dir/depend `
/usr/bin/ld: ../../../lib/libcephfs.so.2.0.0: undefined reference to symbol '_ZN4ceph18__ceph_assert_failERKNS_11assert_dataE'
/usr/bin/ld: ../../../lib/libceph-common.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/test/fs/CMakeFiles/ceph_test_ino_release_cb.dir/build.make:134: bin/ceph_test_ino_release_cb] Error 1
```
while libjson_spirit.a does reference symbol(s) exposed by ceph-common:
```
$ nm -C ../../../lib/libjson_spirit.a | grep __ceph_assert_fail\(ceph::assert_data
U ceph::__ceph_assert_fail(ceph::assert_data const&)
U ceph::__ceph_assert_fail(ceph::assert_data const&)`
```
Xuehan Xu [Wed, 13 Aug 2025 03:49:23 +0000 (11:49 +0800)]
crimson/os/seastore: do "copy_on_write" if the to-be-modified object
needs it
At present, only clone objects may need COW, as HEAD objects won't be
sharing any direct lba mapping with other objects in non-recovery
scenarios.
Although the HEAD object may share its direct mappings with the temp
object that's going to be recovered and replace it, it won't be
accepting any modifications at that time.
Xuehan Xu [Tue, 12 Aug 2025 08:24:08 +0000 (16:24 +0800)]
crimson/os/seastore/object_data_handler: we don't have to maintain the
symmetric indirect lba relationship at the time of clone
OP_CLONE is done in the following way:
1. First, swap the layout of the head onode and the clone onode, so that
clone onode's object_data, omap_root, xattr_root and log_root all
point to the head onode's corresponding fields;
2. Do SeaStore::_clone() from the clone onode to the head onode, which
is exactly what rollback is done.
This makes the code of ObjectDataHandler::clone() and
ObjectDataHandler::copy_on_write() even simpler, and can facilitate the
clone/rollback scenarios when the "128-bit" lba key layout is involved.
Xuehan Xu [Tue, 12 Aug 2025 06:51:15 +0000 (14:51 +0800)]
crimson/os/seastore/onode: add the "need_cow" field to indicate whether
the onode's object data space needs to do clone before modification
At present, it's only when the onode's object data space is sharing its
own direct lba mappings with other onodes that the "need_cow" field
would be true.
For a remote link, try to open the dentry (this part of code
is copied from the mds path_traversal) which internally pushes
the dir_frag in the damage list if applicable.
Remove the code used to migrate Grafana self-signed certificates, as
it is no longer needed. The certmgr logic now handles generating new
certificates during the upgrade, eliminating the need for any migration
code or logic.
Remove the special-case code used for RGW service migration, as it is no
longer needed. The certmgr logic now handles populating the certstore
with the corresponding certificate and key entries by reading their values
directly from the spec. During RGW service redeployment as part of the
upgrade, certmgr will ensure the certstore is updated accordingly.
mgr/cephadm: Fix RGW spec validation for deprecated rgw cert field
Starting from Tentacle, the rgw_frontend_ssl_certificate field has been
deprecated in favor of the new ssl_cert and ssl_key fields. Update the
validation logic to run after this field is automatically transformed into
the new fields, ensuring proper validation of RGW specs.
mgr/cephadm: Include mgmt-gateway/oauth2-proxy in upgrade process
Add the new mgmt-gateway and oauth2-proxy services to the list of
services upgraded by cephadm, ensuring they are updated alongside the
rest of the cephadm-managed services.
John Mulligan [Mon, 22 Sep 2025 17:38:24 +0000 (13:38 -0400)]
mgr/smb: fix error handling for fundamental resource parsing
When an smb resource is input to the smb mgr module in YAML or JSON the
fundamental parsing/deserialization is handled by resourcelib. This
module tries to be largely independent of smb mgr module and defines a
few basic exception types. When these exception types were raised the
`ceph` command line would print out a long traceback. Avoid printing
a traceback by catching these errors with a new contextmanager
(decorator) that is automatically called when using the smb ceph
mgr command api.
Fixes: https://tracker.ceph.com/issues/71992 Signed-off-by: John Mulligan <jmulligan@redhat.com>
Patrick Donnelly [Tue, 23 Sep 2025 12:02:22 +0000 (08:02 -0400)]
Merge PR #65555 into main
* refs/pull/65555/head:
script/redmine-upkeep: include each issue changed in summary
.github/workflows/redmine-upkeep: use smaller limit for testing push
mgr/dashboard: Local storage class creation via dashboard doesn't handle creation of pool.
Fixes: https://tracker.ceph.com/issues/72569 Signed-off-by: Dnyaneshwari <dtalweka@redhat.com>
mgr/dashboard: handle creation of new pool
Commit includes:
1) Provide link to create a new pool
2) Refactored validation on ACL mapping, removed required validator as default
3) fixed runtime error on console due to ACL length due to which the details section was not opening
4) Used rxjs operators to make API calls and making form ready once all data is available, fixing the form patch issues
5) Refactored some part of code to improve the performance
6) Added zone and pool information in details section for local storage class
Fixes: https://tracker.ceph.com/issues/72569 Signed-off-by: Naman Munet <naman.munet@ibm.com>