librdkafka submodule
Vendors librdkafka v2.12.1 as a submodule (default) and teaches the
notification teuthology task to set up Kafka 4.x KRaft brokers. The
distro-shipped librdkafka 1.6.1 cannot SCRAM-auth against Kafka 4.x
brokers (#75900); the bundled version fixes that. Build with
WITH_SYSTEM_RDKAFKA=ON to opt back into the distro library (floor 2.6.1).
follwinf changes needed with teh submodule:
* build kafka_stub only in case of system librdkafka
* use the same header location in submodule and system
* supress compilation warning to avoid -WError issues
2.12.1 matches Fedora(44)'s current librdkafka-devel, so the vendored copy
tracks a version that distro packagers have already vetted rather than
whichever release happens to be latest upstream.
The teuthology version matrix picks one of {3.9.2, 4.1, 4.2, 4.3} per run.
3.9.2 covers the last Zookeeper-based release for the migration cohort.
4.1/4.2/4.3 track Apache's current three supported minor lines and are
resolved to the latest patch at test time via dlcdn.apache.org/kafka/, so
new patches within a supported minor need no PR update. A new minor line
(4.4) requires renaming one YAML.
* new java version (17) is needed for kafka 4.2 and up (we wil use it on
all version)
* kerberos task need to run before the kafka install task
After pulling this branch, fetch the new submodule:
git submodule update --init src/librdkafka
Fixes: https://tracker.ceph.com/issues/77336
Signed-off-by: ShreeJejurikar <shreemj8@gmail.com>
Co-authored-by: Yuval Lifshitz <ylifshit@ibm.com>
The "disabled" search only matches sccache's Disabled("disabled")
payload, not "dist-client feature not selected" or the NotConnected
states. Those reach the success branch, so the job counts become
SchedulerStatus-NOTFOUND, JOB_POOLS is never defined, and ninja
rejects the manifest. Key off the JSON lookup's error instead to
cover every non-dist state.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
Add a build target that builds standalone RGW in addition to normal RGW,
and add an RPM for it that only installs the necessary bits.
Signed-off-by: Daniel Gryniewicz <dang@fprintf.net>
BlueStore's PMEMDevice backend targets byte-addressable persistent
memory exposed as a DAX device, in practice Intel Optane DC persistent
memory. Intel Optane has been discontinued since 2021 and there is no
mainstream replacement, so the backend has effectively no hardware left
to run on. It was always experimental and has seen no functional change
since the DML/DSA offload landed in 2022; every commit to it since has
been a formatting sweep.
Keeping it builds in a chain of dependencies that nothing else needs:
libpmem, libndctl and libdaxctl, plus dml for the DSA offload that only
works on a Sapphire Rapids CPU. Remove the backend and everything tied
to it.
RBD persistent write-back cache (WITH_RBD_RWL) still uses PMDK's
libpmemobj, so the pmdk submodule, WITH_SYSTEM_PMDK, Buildpmdk and
Findpmdk stay. WITH_SYSTEM_PMDK now depends on WITH_RBD_RWL alone, and
Buildpmdk no longer builds ndctl support.
- remove the WITH_BLUESTORE_PMEM option, HAVE_BLUESTORE_PMEM and
HAVE_LIBDML
- delete src/blk/pmem/PMEMDevice.{cc,h} and the pmem block_device_t
- drop the pmem value from the bdev_type option
- remove the --bluestore-pmem vstart flag
- drop the libpmem, libndctl and libdaxctl build deps from debian and
rpm, keeping libpmemobj for RWL
- delete the Finddml, Findndctl and Finddaxctl cmake modules
- remove the DSA/DML and ndctl documentation
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
Add a WITH_MOLD cmake option that auto-configures the build for
the Mold linker. When enabled, cmake finds mold, sets CMAKE_LINKER,
injects -fuse-ld=mold into all linker flag variables, and sets
USING_MOLD_LINKER which gates the Mold-specific workarounds added
in the previous commit.
Usage: cmake -DWITH_MOLD=ON ...
Assisted-by: Claude <claude.ai>
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
The ceph-api job failed under ASan: radosgw-admin aborted at startup with a
heap-buffer-overflow in boost.context's fiber resume().
==1155842==ERROR: AddressSanitizer: heap-buffer-overflow ... READ of size 8
#0 boost::context::detail::fiber_activation_record::resume() fiber_ucontext.hpp:153
#10 RGWSI_Notify::do_start(optional_yield, DoutPrefixProvider const*) svc_notify.cc:261
0x... is located 8 bytes after 1048-byte region allocated by
boost::context::detail::fiber_activation_record_initializer()
fiber_activation_record carries three extra members (fake_stack, stack_bottom,
stack_size) only when BOOST_USE_ASAN is defined. Under WITH_ASAN we build
boost.context with context-impl=ucontext and give consumers BOOST_USE_ASAN and
BOOST_USE_UCONTEXT through Boost::context's INTERFACE_COMPILE_DEFINITIONS, but
we never pass BOOST_USE_ASAN to b2. So libboost_context, which compiles
fiber_activation_record_initializer() and allocates the record, uses the
smaller no-ASan layout, while consumers that include the header (here rgw's
RGWSI_Notify::do_start via boost::asio::spawn) compile resume() with the larger
layout and read stack_bottom/stack_size past the allocation.
Pass define=BOOST_USE_ASAN to b2 so the library and its consumers agree on the
struct layout.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
add_ceph_test() spelled out the suppression-file paths and sanitizer flags
inline. bin/ceph needs the same options, so lift them into CEPH_ASAN_OPTIONS
and CEPH_LSAN_OPTIONS and have add_ceph_test() consume those. The environment
the tests run with is unchanged.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
Under WITH_ASAN Boost.Context is built ucontext-only, so consumers that
include its headers without linking Boost::context (e.g. libosd) were
still built for the fcontext backend and broke the link:
mold: error: undefined symbol: boost::context::detail::make_fcontext
Define the backend tree-wide so every consumer agrees on it.
riscv64's ASan runtime mis-handles makecontext/swapcontext, so the
ucontext fiber backend reports false-positive heap-buffer-overflows on
fiber switch that can't be suppressed. So exclude it.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
tcmalloc/jemalloc keep exporting the global operator new/delete even though
their malloc is shadowed by the sanitizer interceptor, so memory the sanitizer
allocated gets freed through tcmalloc and SIGSEGVs (e.g. seastar coroutine
frames). Force libc when WITH_ASAN is set.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
debhelper on noble passes -DFETCHCONTENT_FULLY_DISCONNECTED=ON, so CPM
cannot fetch Catch2 and silently skips it, leaving no Catch2 targets
behind and breaking the generate step. Fall back to WITH_CATCH2=OFF
with a warning instead.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
By default ceph builds the bundled src/spdk fork via BuildSPDK. Add a
WITH_SYSTEM_SPDK option that instead locates a distro-provided SPDK
through a new Findspdk.cmake (pkg-config based, modelled on
Finddpdk.cmake), exposing the same spdk::spdk target.
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
Add a cmake option to build ceph's erasure code plugins (ec_jerasure
and ec_shec) against system-provided jerasure and gf-complete libraries
instead of the vendored copies.
This allows downstream distributions to build with their own packaged
versions of these libraries. For instance, Debian has shipped
libjerasure-dev and libgf-complete-dev as build dependencies for ceph
since 2021, but the build always used the vendored copies because there
was no cmake option to use the system ones.
Using system libraries also lets distributions benefit from any
optimizations or fixes applied to their packages without having to
carry patches against ceph's vendored copies. For example, the vendored
gf-complete requires a downstream -O1 workaround to avoid emitting
SSE 4.1 instructions that crash on older CPUs. But with system libraries,
that becomes the library package's responsibility.
The option is OFF by default, preserving the current behavior of
building from vendored sources.
A new FindJerasure.cmake module locates the system jerasure and
gf-complete headers and libraries, and creates the Jerasure::jerasure
imported target with the same target name that the vendored build now
provides (see previous commit).
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
BOOST_ASIO_HAS_IO_URING is a user-defined macro that enables io_uring
support in Boost.Asio for specific operations that explicitly opt in,
such as file I/O via basic_file (BOOST_ASIO_HAS_FILE) and buffer
registration. Unlike BOOST_ASIO_HAS_IO_URING_AS_DEFAULT, it does NOT
replace epoll as the default event loop. Currently, Ceph does not use
Boost.Asio to perform file I/O, so this macro only affects compilation,
not runtime behavior.
When BOOST_ASIO_HAS_IO_URING is defined, the umbrella header
boost/asio.hpp pulls in <liburing.h> via:
boost/asio.hpp
-> boost/asio/basic_file.hpp (guarded by BOOST_ASIO_HAS_FILE)
-> boost/asio/detail/io_uring_file_service.hpp
-> boost/asio/detail/io_uring_descriptor_service.hpp
-> boost/asio/detail/io_uring_service.hpp
-> <liburing.h>
PR #50821 introduced BOOST_ASIO_HAS_IO_URING (commit 05c341b30d) as
preparation for uring-based file I/O in rgw/posix. To avoid pulling
liburing headers (which define macros like BLOCK_SIZE and DATA_OFFSET
that conflict with Ceph code) into unrelated translation units, that PR
also converted many files to use granular Boost.Asio includes instead of
the umbrella boost/asio.hpp.
However, BOOST_ASIO_HAS_IO_URING was added as a global compile
definition, and individual targets linked uring::uring directly. This
has two problems:
1. The uring::uring CMake target only exists when WITH_LIBURING=ON, so
targets that link it unconditionally break when WITH_LIBURING=OFF.
2. The global definition causes all translation units to see
BOOST_ASIO_HAS_IO_URING, even those that don't need io_uring.
Since neither CMake's FindBoost module nor Boost's CMake config file
defines a Boost::asio target, introduce one as an INTERFACE IMPORTED
library. When WITH_LIBURING=ON, the Boost::asio target carries the
BOOST_ASIO_HAS_IO_URING definition and uring::uring dependency; when
WITH_LIBURING=OFF, it is an empty interface. Targets that don't need
io_uring should use Boost::headers or Boost::boost instead.
This also improves code organization:
- Scope the BOOST_ASIO_HAS_IO_URING compile definition to Boost::asio
instead of adding it globally, so only targets that actually use
Boost.Asio with io_uring see the definition.
- Place the uring-in-Boost::asio configuration next to where we
build/detect Boost libraries for better readability.
- Set the Boost::asio properties in a single place for better
maintainability.
See also
- 05c341b30d
- f479bbc4bc
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
aio is used to set WITH_LIBURING, instead of finding it twice try to
find aio if either flags are set.
Does not change existing behavior for Bluestore.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Boost has included this since 1.70 and CMake has deprecated the
non-config version since 3.30.
See also
https://cmake.org/cmake/help/latest/policy/CMP0167.html#policy:CMP0167
We enable CMP0167 (The `FindBoost` module is removed.) to force cmake
to use the installed Boost configuration files rather than its own
detection.
We also enable CMP0144 (`find_package()` uses upper-case
`<PACKAGENAME>_ROOT` variables.) to ensue that the `BOOST_ROOT`
parameter continues to function in the config-style `find_package`.
`BuildBoost.cmake` is updated to add the `Boost::headers` interface
target to match configured system boost (retaining the Boost::boost
alias).
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
In boost 1.89, the stub compiled library for Boost.System was removed.
According to the boost 1.89 release notes: "The stub compiled library
has been removed; System has been header-only since release 1.69.",
See https://www.boost.org/releases/1.89.0/ .
This change removes or replaces Boost::system linkage throughout the
codebase:
1. Removed "system" from BOOST_COMPONENTS in the root CMakeLists.txt,
as the library no longer exists in boost 1.89+.
2. Where Boost::system was the only linked boost library, replaced it
with Boost::boost (the header-only meta-target) to maintain access
to Boost.System's header-only functionality.
3. Where other boost libraries were already linked (e.g., Boost::thread,
Boost::regex, Boost::filesystem), removed Boost::system entirely, as
the header-only System library dependency is automatically satisfied
by other boost components.
This is not a breaking change since the minimum required boost version
for this project is 1.87, where Boost.System was already header-only
(only the stub compiled library remained for compatibility).
Signed-off-by: Kefu Chai <kchai@redhat.com>
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.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Adding a new progress tracking class in the cephfs offline tools dir that is consumed by multiple
utilities namely cephfs-data-scan, cephfs-journal-tool, cephfs-table-tool.
Multiple commands under each utility now have progress tracking included by default.
The progress tracking is not option based- i.e. no "--progress" option required.
This is because if we keep it option based and the user forgets to include the option while
firing the command, then the only recourse is to kill the execution and restart. This is not
suitable for state changing operations, hence better to include progress tracking by default.
Exact command list where progress tracking is included is specified in the tracker.
Testing updates also posted in tracker, initial testing with single and multi-threaded
loads on FS with 4M objects succeeded for cephfs-data-scan.
- Updated DataScan to use worker_n and worker_m for better clarity and functionality.
- Added set_progress_operation_name method to manage operation names during progress tracking.
- Enhanced ProgressTracker with new methods for detailed progress reporting and ETA calculations.
- Improved thread safety and performance in progress updates.
- Added terminal width detection and line padding for better display.
- Introduced write_console_line function to manage console output.
- Updated progress display logic to throttle updates based on time.
- Removed display_interval variable to streamline progress updates.
Fixes: https://tracker.ceph.com/issues/63191
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
in 1ba55a20be, i tried to avoid the NOT
condition by swapping the option's defaults. but when the condition is
false, the option is forced to ON even if the user manually set it OFF
fix this by inverting the condition and swapping the default values
Reported-by: Joseph Mundackal <joseph.j.mundackal@gmail.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
a bit simpler without the WITH_BREAKPAD_DEFAULT part, and causes the
WITH_BREAKPAD option to be hidden from cmake-gui on WIN32
Signed-off-by: Casey Bodley <cbodley@redhat.com>
commit 3068123667 introduced the cmake
option WITH_SYSTEM_QATLIB, but the checks were based on nonexistent
variable WITH_SYSTEM_QAT
Signed-off-by: Casey Bodley <cbodley@redhat.com>
with WITH_RADOSGW_DBSTORE=OFF, the posix backend fails to link with:
> /usr/bin/ld: cannot find -ldbstore: No such file or directory
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Remove the deprecated WITH_SEASTAR CMake option and replace all
references with WITH_CRIMSON for consistency. Although WITH_SEASTAR
was functionally replaced in commit 23c33f69, it remained in the
source tree. This change completes the migration by removing the
old option entirely and standardizing on WITH_CRIMSON throughout
the codebase.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Since upgrading minimum CMake version to 3.22.1 (commit 469d82a1), we can
now use find_program(REQUIRED) which was introduced in CMake 3.18.
This change replaces manual FATAL_ERROR checks with the REQUIRED option
and adds it to programs that are actually needed during the build. This
ensures the build fails early during configuration rather than later
during compilation when missing programs are invoked.
Changes:
- Replace find_program() + message(FATAL_ERROR) patterns with REQUIRED
- Add REQUIRED to programs that are used during build but previously
had no error checking
Reference: https://cmake.org/cmake/help/latest/command/find_program.html
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Bump the minimum required CMake version from 3.5 to 3.22.1 in both
Ceph and embedded dmclock to address deprecation warnings.
CMake 4.0.2 generates deprecation warnings for projects requiring
versions below 3.10:
```
CMake Deprecation Warning at src/dmclock/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
```
The upstream CI workflow uses Ubuntu 22.04 (CMake 3.22.1) and CentOS 9
(CMake 3.26.5), so bumping to 3.22.1 maintains compatibility with our
supported build environments while enabling access to newer CMake
features.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Currently, if .git exists, we set CMAKE_BUILD_TYPE=Debug.
Otherwise, we leave it empty and no optimization flags will
be used.
With this change, the fallback CMAKE_BUILD_TYPE is set
to RelWithDebInfo instead.
From CMAKE_BUILD_TYPE manual:
The default value is often an empty string, but this is usually not
desirable and one of the other standard build types is usually more appropriate.
Note: One notable change is that -DNDEBUG will now be defined.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Makes Catch2 available for C++ unit tests;
Adds GPM script availability to CMake.
Adds rudimentary test for rgw_hex.
Signed-off-by: Jesse F. Williamson <jfw@ibm.com>
Removes the invalid PRE_BUILD argument from add_custom_command(OUTPUT)
calls that was triggering CMake warnings. The PRE_BUILD option is only
valid for target-based custom commands and specifically with Visual
Studio generators.
Additionally sets the CMP0175 policy to NEW to ensure CMake fails on
invalid arguments to add_custom_command(), helping catch similar issues
earlier in the development process.
This change:
- Removes unnecessary PRE_BUILD argument from OUTPUT-based custom commands
- Sets CMP0175 policy to enforce validation of add_custom_command() arguments
- Resolves CMake warning in src/common/options/CMakeLists.txt
Reference:
https://cmake.org/cmake/help/latest/command/add_custom_command.html#build-events
The CMake warning looks like:
```
CMake Warning (dev) at src/common/options/CMakeLists.txt:34 (add_custom_command):
The following keywords are not supported when using
add_custom_command(OUTPUT): PRE_BUILD.
Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
src/common/options/CMakeLists.txt:85 (add_options)
This warning is for project developers. Use -Wno-dev to suppress it.
```
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
invoking cmake with -DWITH_LIBCEPHFS=OFF fails to configure the client target:
CMake Error at src/client/CMakeLists.txt:13 (target_link_libraries):
Target "client" links to:
Boost::locale
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
because the client target is not conditional on WITH_LIBCEPHFS in src/CMakeLists.txt:
add_subdirectory(client)
if(WITH_LIBCEPHFS)
because client is also needed for ceph-fuse, make the client and its
dependencies depend on WITH_LIBCEPHFS OR WITH_FUSE
Signed-off-by: Casey Bodley <cbodley@redhat.com>
* refs/pull/61321/head:
qa: update require-osd-release to tentacle
tools/monmaptool: bump new cluster version to X
doc/dev/release-checklists: remove ceph-container task
script/ceph-release-notes: add squid/tentacle
doc/dev/release-checklists:: mark task complete
doc/dev/release-checklist: add nightlies task
doc/dev/release-checklists: update ceph-build for tentacle
doc/dev/release-checklists: note redmine is done
qa: update to tentacle
doc/dev/release-checklist: question telemetry tentacle test
osd/OSDMap: update to tentacle
qa/workunits/cephtool/test: update to tentacle
mon/OSDMonitor: update to tentacle
common/options/global.yaml.in: update for tentacle
mon/MgrMonitor: update for tentacle
qa/standalone/mon/misc: update for tentacle
doc: update compatset for tentacle
doc: no deprecated features
include/ceph_features: add SERVER_TENTACLE feature bit
cephadm,ceph-volume: update to tentacle
doc/dev/release-checklist: add backport-create-issue
script: update backport-resolve-issue to tentacle
*: add constants and release names
ceph_release: update to tentacle
librbd: bump version
CMakeLists.txt: update VERSION
doc: remove obsolete checklist item
doc: reset for tentacle
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Bill Scales <bill_scales@uk.ibm.com>
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>