Samuel Just [Tue, 12 Aug 2025 00:36:16 +0000 (17:36 -0700)]
crimson/.../store-bench: refactor arguments and workloads
- Adds a workload abstraction grouping arguments with associated
workload.
- Reworks argument parsing to occur prior to seastar app, allows
passing unparsed arguments to ceph.
- Refactors time usages as necessary to use std::chrono types.
- Removes LOG_PREFIX usages that don't currently have log lines.
- Other minor cleanups not worth separating out.
Improve source rpm detection by adding a new detection method that
executes and rpm command in a container to get exactly the version of
the source rpm that the ceph.spec file would have generated. For
backwards compatibility and that I don't entirely trust myself to have
tested this the old methods are still available.
The old `--rpm-no-match-sha` is now an alias for `--srpm-match=any` to
cause it to build any (unique) ceph srpm it finds.
`--srpm-match=versionglob` retains the previous default behavior of
using a glob matching on the git id or ceph version value. The new
default of `--srpm-match=auto` implements the rpm command based behavior
described above.
All of this is wrapped in a new step `find-rpm` but that's mostly an
implementation detail and for testing.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Alex Ainscow [Wed, 13 Aug 2025 11:03:21 +0000 (12:03 +0100)]
src: Add sign-compare warnings to clang
For a while, GCC has generated warnings about sign errors. A common
mistake if compiling with clang was to accidentally introduce signedness
errors, which were picked up by the GCC builds.
This occurs due to an inconsistency in -Wall implementation between clang
and gcc: gcc includes sign-compare, clang does not.
See:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall
vs
https://clang.llvm.org/docs/DiagnosticsReference.html#wall
Note that sign-compare is included under -Wextra for clang:
https://clang.llvm.org/docs/DiagnosticsReference.html#wextra
Clang will now generate similar warnings with -Wsign-compare:
https://clang.llvm.org/docs/DiagnosticsReference.html#wsign-compare
Interestingly, if specified on its own, -Wsign-compare will include
C, whereas gcc -Wall affects C++ only. Therefore we must work around
this in the make file to emulate the GCC behaviour in clang builds.
Also fix a couple of warnings found in some tests.
Kefu Chai [Mon, 18 Aug 2025 02:41:07 +0000 (10:41 +0800)]
os/Transaction: initialize unused fields in TransactionData
Initialize unused1, unused2, and unused3 fields to zero in TransactionData
to ensure consistent encoding/decoding behavior.
Background:
In commit a0c9fec7, we updated TransactionData encoding/decoding and bumped
the Transaction encoding version from 9 to 10. As part of this change, we
renamed three fields to mark them as unused:
- largest_data_len → unused1
- largest_data_off → unused2
- largest_data_off_in_data_bl → unused3
The move constructor was also updated to stop setting these fields, leaving
them uninitialized after move operations.
Problem:
This worked with existing tests because check-generated.sh reused struct
instances, preserving stale values across encode/decode cycles. However,
an upcoming test change will stop reusing instances and compare hexdumps
of encoded/re-encoded values to verify consistency. Uninitialized fields
cause these comparisons to fail due to garbage values.
Solution:
Initialize the unused fields to zero in the move constructor. This preserves
existing behavior while ensuring consistent encoding. These fields can be
removed entirely in a future change.
Samuel Just [Wed, 13 Aug 2025 16:54:35 +0000 (09:54 -0700)]
crimson/.../fixed_kv_node: don't call copy_out if delta_buffer is empty
Cache::mark_transaction_conflicted calls get_delta(), which in turn
calls FixedKVNodeLayout::copy_out for lba nodes. If the mutation_pending
extent happens not to have any deltas, it'll fail in memcpy in
FixedKVNodeLayout::copy_out.
I think this is valid because a transaction may become conflicted
between when duplicate_for_write is called and when the actual mutation
is performed on the extent.
Fixes: https://tracker.ceph.com/issues/72579 Signed-off-by: Samuel Just <sjust@redhat.com>
Ronen Friedman [Thu, 7 Aug 2025 04:54:30 +0000 (23:54 -0500)]
qa/standalone/scrub: re-code osd-scrub-dump.sh to test scrub repair functionality.
The new version of osd-scrub-dump.sh is designed to
allow multiple "corruption methods" on a subset of objects.
The functionality includes specifying:
- the number of objects created;
- the number to have their Primary version modified;
- the number to have their Replicas modified;
- the set of "manipulations" to perform on the objects.
The arm64-only module uadk needs numa.h to build; nothing else
ensures it's available. Make it an unconditional ceph build
dependency on behalf of the arm64 build.
Fixes: https://tracker.ceph.com/issues/72594 Signed-off-by: Dan Mick <dan.mick@redhat.com>
tasks/cephfs: Use different errmsg for invalid dir
During test_df_for_invalid_directory, path_walk is now called.
Use a more general error message as more errnos can be returned
and this will be a better catch all.
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Dan Mick [Wed, 13 Aug 2025 19:16:45 +0000 (12:16 -0700)]
pybind/mgr/dashboard/frontend: add NPM_CACHEDIR envvar, use in bwc
Add an optional NPM_CACHEDIR environment variable to serve as the
cache parameter for npm in the dashboard frontend build. The idea
is to allow it to persist across builds so that we decrease the load
on registry.npmjs.org, which has been throttling our requests when
using build-with-container.py, and also hopefully improve the time
of the frontend npm operations.
build-with-container.py also grows a --npm-cache-path option to allow
setting it for container builds and passing the envvar to the build.
Fixes: https://tracker.ceph.com/issues/72298 Signed-off-by: Dan Mick <dan.mick@redhat.com>
John Mulligan [Wed, 13 Aug 2025 16:59:24 +0000 (12:59 -0400)]
cephadm/smb: fix issue setting port of remote-control sidecar
Use the new set of constants to ensure all components that touch the smb
services use the same set of ports and port names. Ensure that the
remote-control sidecar service's port can be customized.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 13 Aug 2025 16:58:06 +0000 (12:58 -0400)]
mgr/smb: update port validation to use new smb constants
Make behavior consistent across the smb mgr module and the service spec
class by using the same set of constants.
Fix an issue supporting the customization of the `remote-control`
sidecar's port.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
rgw/restore: Update expiry-date of restored copies
As per AWS spec (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html),
if a `restore-object` request is re-issued on already restored copy, server needs to
update restoration period relative to the current time. These changes handles the same.
Note: this applies to only temporary restored copies
John Mulligan [Wed, 13 Aug 2025 15:06:35 +0000 (11:06 -0400)]
python-common: add a new smb sub package
Add a new smb sub package for smb related things that are meant to
be shared throughout the Ceph python code related to smb and the
smb management stack.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Jon Bailey [Mon, 11 Aug 2025 11:51:42 +0000 (12:51 +0100)]
erasure-code/consistency: Allow consistency checker to be able to deal with non-4k aligned buffers
A parity returned to the client will be the size of shard 0, which may not be 4k aligned in optimised erasure coding. A parity returned through the encode function will always be 4k aligned. This change makes it so we truncate the encoded data down to the size of the client write before comparing them together in the consistency check so we know we are comparing them like-for-like
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
Jon Bailey [Thu, 17 Jul 2025 15:51:58 +0000 (16:51 +0100)]
test/osd: Move initialisation of overwrites and optimisation earlier in ceph_test_rados_io_sequence
All other pool initialisation happens straight after pool creation, however these two items happen later on. This is just due to them being the first two rest calls added. We now have better and more logical places for this code and this commit is moving it into this structure.
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
Afreen Misbah [Mon, 11 Aug 2025 09:03:32 +0000 (14:33 +0530)]
mgr/dashboard: Replace capacity threshold data with prometheus metrics
- Fixes https://tracker.ceph.com/issues/72519
- the osd dump metrics is used in /api/osd/settings
- this metrics creates perf bottleneck when osds are 1000s
- replacing with similar prometheus metrics
- minor refactors - including renaming, comments.
client: get quota root based off of provided inode in statfs
In statfs, get quota_root for inode provided. Check if a quota
is directly applied to inode. If not, reverse tree walk up and
maybe find a quota set higher up the tree.
Fixes: https://tracker.ceph.com/issues/72355 Signed-off-by: Christopher Hoffman <choffman@redhat.com>