John Mulligan [Mon, 16 Jun 2025 20:04:35 +0000 (16:04 -0400)]
python-common/deployment: add bind_addrs and related type for smb
Add a `bind_addrs` field and `SMBClusterBindIPSpec` to the smb service
spec. If specified the `bind_addrs` field can contain one or more
SMBClusterBindIPSpec value. In JSON these values can contain either an
address `{"address": "192.168.76.10"}` or network `{"network":
"192.168.76.0/24"}`.
These specs will be used by cephadm to place the smb service only on
hosts that have IPs matching the supplied IP Address/Network values. It
will also instruct the smb services to only bind to these addresses.
A suggested future enhancement may be include an IP address range
representation for the SMBClusterBindIPSpec.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Mon, 16 Jun 2025 20:05:14 +0000 (16:05 -0400)]
mgr/cephadm: teach serve.py about host selector support
A previous commit added a HostSelector protocol type to the schedule
code. This change makes it so the function calling upon the
HostAssignment class detects if a CephService provides a
filter_host_candidates method - meaning the service class can act as a
HostSelector. If the class can be a HostSelector pass it to the
HostAssignment so that the custom selection operation can be run.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Mon, 16 Jun 2025 20:05:01 +0000 (16:05 -0400)]
mgr/cephadm: prepare schedule.py for per-service-type host filtering
Prepare schedule.py for per-service-type host filtering based on allowed
host addresses/networks. Add a new HostSelector protocol type to the
module defining what the filtering interface looks like.
This interface is intended allows CephService classes to "take over" the
network based filtering of nodes prior to placement and customize the
behavior of this step in cephamd's placement algorithm.
Note that the type must be passed in to the HostAssignment class as an
optional argument. If nothing is passed the class behaves as it did
before.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Edit the section "Data Pool Damage" in doc/cephfs/disaster-recovery.rst.
This commit is part of the project of improving the data-recovery parts
of the CephFS documentation, as requested in the Ceph Power Users
Feedback Summary in mid-2025.
auth: remove unused AuthTicket::renew_after member variable
The AuthTicket::renew_after field is only set in init_timestamps() and
read by dump() for debugging purposes. It has no functional use cases
and causes encoding/decoding inconsistencies.
During decoding, this field remains unchanged, creating discrepancies
between original and decoded values. This issue was masked because
check-generated.sh and readable.sh reused struct instances, preserving
stale field values across encode/decode cycles.
An upcoming change will allocate fresh instances for each decode
operation, which would expose these inconsistent values.
Remove the unused field to eliminate the encoding inconsistency and
simplify the codebase.
Alex Ainscow [Mon, 21 Jul 2025 07:17:57 +0000 (08:17 +0100)]
osd: Replace deprecated std::align_storage_t with alignas
C++23 has been enabled, causing deprecated warnings. Following the
"possible implementation" in the C++ docs, I have replaced the last
remaining aligned_storage_t.
* refs/pull/63214/head:
release note: add a note that "subvolume info" cmd output can also...
doc/cephfs: update docs since "subvolume info" cmd output can also...
qa/cephfs: add test to check clone source info's present in...
mgr/vol: show clone source info in "subvolume info" cmd output
mgr/vol: keep clone source info even after cloning is finished
* refs/pull/58564/head:
client: clamp sizes to INT_MAX in sync i/o code paths
client: restrict bufferlist to total write size
src/test: test sync/async i/o code paths with huge (4GiB) buffers
- for arm64 hitting (Use `node --trace-warnings ...` to show where the warning was created)
NX Cannot find module @rollup/rollup-linux-arm64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
Pass --verbose to see the stacktrace.
- due this this make check arm64 failing
- added the fix as per https://github.com/vitejs/vite/discussions/15532#discussioncomment-13369584
- its failing then NX Falling back to ts-node for local typescript execution. This may be a little slower.
NX Cannot find module '@rspack/binding-linux-arm64-gnu'
- the above fix failed asking more deps from rollup, so added whole rollup package
this suite hasn't provided much benefit since it was added, and is
becoming more of a maintenance burden recently:
* https://tracker.ceph.com/issues/71584
* https://tracker.ceph.com/issues/72179
osd/scrub: allow auto-repair on operator-initiated scrubs
Previously, operator-initiated scrubs would not auto-repair, regardless
of the value of the 'osd_scrub_auto_repair' config option. This was
less confusing to the operator than it could have been, as most
operator commands would in fact cause a regular periodic scrub
to be initiated. However, that quirk is now fixed: operator commands
now trigger 'op-initiated' scrubs. Thus the need for this patch.
The original bug was fixed in https://github.com/ceph/ceph/pull/54615,
but was unfortunately re-introduced later on. Fixes: https://tracker.ceph.com/issues/72178 Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
librbd: images aren't closed in group_snap_*_by_record() on error
Fixes memory leak and handles resource leak scenario when at leat one IoCtx is not
created successfully. This is done by returning error before opening any image.
Changes are made in group_snap_remove_by_record and group_snap_rollback_by_record
John Mulligan [Wed, 16 Jul 2025 18:07:33 +0000 (14:07 -0400)]
build-integration-branch: allow setting git trailer on final commit
After the last commit is made, provide a simple mechanism for adding
git trailers to the commit message. The git trailers [1] are metadata
that tools may make use of. In particular, we add a few of the
trailers documented by ceph-build here [2] as well as allowing
for arbitrary trailers for future changes (before this code can
be updated), advanced trailer, or other unrelated purposes.
John Mulligan [Wed, 16 Jul 2025 17:39:27 +0000 (13:39 -0400)]
build-integration-branch: convert to argparse
Convert build-integration-branch to use the stdlib argparse module.
Argparse is:
* Part of the python standard library and available since 3.2
* Well documented as a stdlib component
* Widely used
* Fairly simple and direct
docopt is:
* Clever
* Not documented as a dependency of this script (so I bet most users
are relying on the fallback behavior)
* Of questionable maintenance status with:
- No releases since 2014
- Only four PRs merged since 2019
- Last merged PR was merged, recommending an alternate repo, and then
disappeared from the commit history of the master branch, indicating
a possible maintainership/status discrepancy
- Only a couple of commits merged since 2018 (visible on github)
* In my opinion: not particularly ergonomic esp. wrt dictionary based
key access
I feel pretty comfortable making this conversion as I think it will
make the script easier to maintain and extend.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 16 Jul 2025 17:03:24 +0000 (13:03 -0400)]
build-integration-branch: add a main function
Follow typical python best practicies and add a if-name-equals-main
script guard and a main function. Body of the if statement is largely
unchanged from the bulk of the script.
View with: git diff -w
Signed-off-by: John Mulligan <jmulligan@redhat.com>
cephadm.postinst fails on ubuntu 24.04, because the cephadm user it
creates ends up with a `/nonexistent` home directory:
> mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory
on ubuntu 22.04, this user's home directory is `/home/cephadm`
the `adduser` man page for 24.04 includes this new text:
> If no home directory is specified, the default home directory for a new system user is /nonexistent. This directory should never exist on any Debian system, and adduser will never create it automatically.
Ville Ojamo [Wed, 16 Jul 2025 14:59:08 +0000 (21:59 +0700)]
doc/radosgw: Internal link and single-keystroke improvements
Use ref for hyperlink instead of abusing "external links" feature for
intra-docs link in cloud-transition.rst, add a label in
cloud-restore.rst for it.
Use auto-generated link text instead of manually adding that same
section title as link text in cloud-transition.rst.
One list item was missing a colon in s3_objects_dedup.rst.
Add space between number and units in s3_objects_dedup.rst.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
Ville Ojamo [Wed, 16 Jul 2025 08:21:20 +0000 (15:21 +0700)]
doc/radosgw: Small improvements in s3_objects_dedup.rst
Fix sentence that had "different same" to just "different" (verified the
right one from the original author).
Remove colon at the end of section titles.
Remove rendered horizontal lines between sections.
Use double backticks for command name.
Use regular apostrophe in one sentence to be consistent with the rest.
Add missing full stop at the end of several sentences.
Very small language improvements in a few sentences.
Use consistent indent in one line.
Remove hyphens from many word pairs and don't capitalize few terms.
For consistency with rest of the docs.
Fix typos "spliting" to "splitting", "underlined" to "underlying".
Spell out "thousands" instead of using an apostrophe after the number.
Reformat table to use row separators like rest of the docs instead of
empty columns.
Separate number and unit with a space. Remove rendered underscores that
seemed to be an attempt to imprecisely align cell contents to right.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
include/function2.hpp: avoid using std::aligned_storage_t
std::aligned_storage_t was deprecated in C++23, now that we've switched
to C++23. let's address the warning like:
```
In file included from /mnt/igor/github/salieri11/ceph/src/osdc/Objecter.cc:15:
In file included from /mnt/igor/github/salieri11/ceph/src/osdc/Objecter.h:44:
/mnt/igor/github/salieri11/ceph/src/include/function2.hpp:962:10: error: 'aligned_storage_t' is deprecated [-Werror,-Wdeprecated-declarations]
962 | std::aligned_storage_t<Capacity> capacity_;
```
in this change, we
- update function2.hpp with upstream
- apply the fix to trade std::aligned_storage_t with an alignas-based
equivalent implementation
rgw: pass list_parts_each_t function by lvalue reference
list_parts_each_t is an alias of
`fu2::unique_function<int(const Part&) const>`, which is a non copyable
function. so in theory, we cannot copy it. and in the recent version of
function2, unique_function is not coyable anymore. if we bump up the
vendored function2.hpp, the build breaks.
so, in this change, we change the virtual function of
`Object::list_parts()` from passing the plain value of
`list_parts_each_t` to rvalue reference `list_parts_each_t` so that we
don't need to copy this non-copyable function. this allows us to
keep in sync with upstream function2, and to be symantically correct
regarding to the unique-ness of the functor.