cmake: Fix warning suppression for googletest build
In commit 27e9d563, we attempted to disable deprecated warnings when building
googletest, but the implementation contained two errors:
1. The `set_property()` call occurred before adding the target directory,
making it impossible to set properties on non-existent objects.
2. The `-Wno-deprecated-declarations` flag was incorrectly passed as an
`APPEND` argument instead of a `PROPERTY` argument.
This caused build failures with libstdc++-12 and newer Clang versions:
```
CMake Error at src/CMakeLists.txt:772 (set_property):
set_property given invalid argument "-Wno-deprecated-declarations".
```
This commit fixes both issues by:
- Moving the `set_property()` call after `add_subdirectory()`
- Correctly passing the warning flag as a `PROPERTY` argument
The io sequencer has been written to primarily test the new EC code. This commit
turns that flag on by default. It also provides a flag to disable the new
optimizations, which we expect to drop in the future.
John Mulligan [Wed, 2 Apr 2025 20:36:29 +0000 (16:36 -0400)]
doc/mgr: add a warning about the smb clustering option & placement
Add a warning to the docs highlighting that `clustering` is an advanced
option and setting it without out also setting a compatible placement
value may lead to unexpected behavior.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
common/mempool.cc: Improve performance of sharding
Reviewed-by: Adam Kupczyk <akupczyk@redhat.com> Reviewed-by: Jose Juan Palacios-Perez <perezjos@uk.ibm.com> Reviewed-by: John Agombar <agombar@uk.ibm.com> Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
On EC pool:
- Use host count instead of device count for host crush-failure-domain
- Host warning for k+m+1
On replicated:
- Set 'All devices' as default
Fixes: https://tracker.ceph.com/issues/70764 Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
cmake: disable deprecated warning when building googletest
In commit 986f6918, we updated the googletest submodule to silence a
CMake warning. However, this change broke the build due to a Clang issue
where it warns about deprecated declarations even from system headers
(see https://github.com/llvm/llvm-project/issues/76515). Since we use
`-Werror` in our compile options, these warnings become errors and fail
the build.
This change detects if we're affected by the specific combination of
compiler, standard library, and compile options that triggers this
issue. It then conditionally disables the `-Wdeprecated-declarations`
warning when building googletest to resolve build failures caused by
deprecated functions like `get_temporary_buffer<>` in the standard
library.
The build failure looks like:
```
FAILED: src/googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
...
In file included from /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/src/gtest-all.cc:38:
In file included from /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest.h:55:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory:66:
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8: error: 'get_temporary_buffer<testing::TestInfo *>' is deprecated [-Werror,-Wdeprecated-declarations]
263 | std::get_temporary_buffer<value_type>(_M_original_len));
| ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:4996:15: note: in instantiation of member function 'std::_Temporary_buffer<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, testing::TestInfo *>::_Temporary_buffer' requested here
4996 | _TmpBuf __buf(__first, (__last - __first + 1) / 2);
| ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:5070:23: note: in instantiation of function template specialization 'std::__stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, __gnu_cxx::__ops::_Iter_comp_iter<(lambda at /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/src/gtest.cc:3024:20)>>' requested here
5070 | _GLIBCXX_STD_A::__stable_sort(__first, __last,
| ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/src/gtest.cc:3023:8: note: in instantiation of function template specializatio
```
Dan Mick [Tue, 1 Apr 2025 19:08:45 +0000 (12:08 -0700)]
doc/dev/release-process.rst: document new Jenkins job for containers
The manual instructions for building release containers were complex
and required access to an arm64 host; that was just too much,
so I've created a Jenkins job to build all of the prerelease
artifacts (see https://github.com/ceph/ceph-build/pull/2342).
Change the documentation to reflect that.
Adam King [Mon, 4 Nov 2024 19:13:02 +0000 (14:13 -0500)]
mgr/cephadm: trigger host metadata refrsh when taking host out of maintenance
If a host was in maintenance mode, we should make sure to check
all of the host information again once it's taken out even if
it hasn't been long enough for the daemon/device/facts etc. cache
to timeout. Some users may make changes to things like the node's
hardware or OS during maintenance mode that we should make sure to
pick up as soon as possible
Adam King [Mon, 4 Nov 2024 19:07:01 +0000 (14:07 -0500)]
mgr/cephadm: add func to invalidate all host metadata and kick serve loop
We already had one of these specifically for daemons. This commit
just adds the same but for all types of host metadata. Currently
the intended use is to call this when taking a host out of maintenace
mode as it's not just the daemons that could have been modified
while the host was in maintenance mode.
would create the my_zone.rgw.buckets.data pool as an
ec pool with a new ec porfile with k=8 and m=2. Currently
the ec profile fields this spec will make use of
are only "k", "m", "pg_num" and "crush-device-class".
If other attributes are set, or if the pool type is
"replicated" the key value pairs are assumed to
be ones that can be passed to the "ceph osd pool create"
command. The other pools for the rgw zone (e.g. buckets
index pool) are all made as replicated pool with
defaults settings
1. Add miscompare message containing object ID.
2. Fix compiler warning due to strangely placed assert.
3. Add barriers following error injects to insure they
are in place before IO.
4. Do not, by default, test EC profiles that are not
known to be good for EC optimisations.
5. Add "allow_unstable_pool_configs" to override above.
Adam Emerson [Fri, 12 Jul 2024 22:05:20 +0000 (18:05 -0400)]
rgw/multisite/datalog: Decrement with grace period
This guards against an excess decrement in the sequence:
RGW_a: Fetch sem_set (see key 'foo')
RGW_b: run renew_entry ('foo' is no longer in `cur_cycle`)
RGW_a: notify (does not see 'foo' in response)
RGW_a: Decrements 'foo'