test/rbd-mirror: eliminate a race in ResyncRequestedRemoteNotPrimary
Adjust the wait_for_notification call in TestMockImageReplayerSnapshotReplayer.ResyncRequestedRemoteNotPrimary
to expect 2 notifications instead of 1. This allows the test to correctly wait for both expected events
i.e for finish_sync() and handle_replay_complete(locker, -EREMOTEIO, "remote image demoted"), ensuring the
replayer transitions to STATE_COMPLETE and is_replaying() returns false as intended.
Ville Ojamo [Fri, 18 Jul 2025 05:53:08 +0000 (12:53 +0700)]
doc/radosgw: Simple fixes and improvements, links improvements
Fix table with a column separator problem in s3/bucketops.rst.
Remove whitespaces at end of lines in s3/bucketops.rst.
Linkify mention of multizone into multisite.rst in bucket_logging.rst.
Separate units from numbers with a space in bucket_logging.rst
Consistency in capitalization and full stop usage in table data in
s3-notification-compatibility.rst s3/bucketops.rst.
Use ref for intra-docs link instead of "external links" feature in
s3/bucketops.rst notifications.rst s3.rst, add a label in start of
s3-notification-compatibility.rst for it. Follow label format that seems
to be in the majority.
Use auto-generated link text that ref provides.
Reflow the text in the cell. Extend table syntax width to accommodate
longer text in cell.
Use ref similarly on links to s3/bucketops.rst. Add a label in it and
use it from bucket_logging.rst and notifications.rst.
Delete unused external link definition in s3/bucketops.rst.
Remove multiple whitespace at the end of lines in notifications.rst
s3-notification-compatibility.rst bucketops.rst.
Change tab characters to spaces in indentation in bucketops.rst
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
qa/suites/krbd: request msgr1 explicitly in unmap subsuite
Since commit 5011cc926cd4 ("qa/suites/krbd: run unmap subsuite with
msgr1 only"), unmap.t is run only against msgr1. pre-single-major.yaml
kernel has actually been gone for some time now, but there is still
value in maintaining a msgr1-only test. With the default switched to
msgr2 in commit a577f6fa405c ("krbd: "rbd device map" command should
use msgr2 by default"), msgr1 needs to be requested explicitly.
pybind: replace deprecated license classifiers with SPDX expression
Replace the deprecated "License :: OSI Approved :: GNU Lesser General
Public License v2 or later (LGPLv2+)" classifier with the SPDX license
expression "LGPL-2.0-or-later" in the license field.
Recent setuptools versions warn that license classifiers are deprecated
in favor of SPDX expressions in the license field. This change eliminates
the deprecation warning while maintaining the same licensing terms.
The warning looked like:
```
[1/1] Generating ../../../lib/cython_modules/lib.3/rados.cpython-313-x86_64-linux-gnu.so
/usr/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
In the EnableRequest state machine, clean up the handling of the async
request to fetch the mirror image, particularly when a non-primary image
is being created by the rbd-mirror daemon.
John Mulligan [Tue, 17 Jun 2025 19:09:20 +0000 (15:09 -0400)]
cephadm: add support for specific network binds to smb service
Add a bunch of code to support specific IP address (and/or interface -
see below) binds for the smb service. When the smb service is not
clustered it is using container networking - in this case we use
publish options for the container manager to only listen on the supplied
addresses.
When the smb service is clustered we need to jump through a bunch of
hoops to configure each service individually. Many are easy with just
a short set of CLI options. CTDB only listens on the (first) node
address that it can bind to and only that. smbd has complex interactions
based on the `interfaces` and `bind interfaces only` config parameters.
Because these parameters may be unique to a node (addresses certainly
will be - and interfaces names could be) we can not store this in
the registry based conf. Instead, we take the slightly hacky approach
of generating a stub conf file with just the interfaces related params
in them and telling sambacc to generate a config that includes this
stub config.
IMPORTANT: When using ctdb with public addresses smbd doesn't know what
additional IPs it may need to listen to, so instead of binding to
a fixed IP we configure it to use an interface. This does have a
downside of possibly listening to another address on the same interface
we don't want it to. Additionally, I have observed that as addresses
are added or removed from the interface by ctdb, smbd doesn't
consistently start listening to those addresses.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 18 Jun 2025 21:18:30 +0000 (17:18 -0400)]
mgr/cephadm: teach ctdb nodes logic about bind_addrs
Within the cephadm smb service class we have logic to help manage CTDB's
nodes. Ensure that this node handling logic also conforms to the recent
addition of the smb service's bind_addrs field.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Mon, 16 Jun 2025 20:05:22 +0000 (16:05 -0400)]
mgr/cephadm: add filter_host_candidates method to smb service class
Add a filter_host_candidates method to the smb service class allowing
that class to act as a HostSelector. The HostSelector was added in an
earlier commit to allow classes like this one to make specific host
selections based on unique to that class (or it's spec) criteria.
This method uses the newly added `bind_addrs` field of the smb service
spec to ensure only hosts that meet the desired set of
networks/addresses get used in placement.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
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>