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.
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.
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.
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.
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.
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.
Dnyaneshwari [Thu, 22 May 2025 07:08:25 +0000 (12:38 +0530)]
mgr/dashboard: Glacier Storage Class - create and list Fixes: https://tracker.ceph.com/issues/71897 Signed-off-by: Dnyaneshwari Talwekar <dtalwekar@redhat.com>
(cherry picked from commit 68766699bafc16a16b82f0d72f1f3e074988c5ca)
Dnyaneshwari [Thu, 22 May 2025 07:08:25 +0000 (12:38 +0530)]
mgr/dashboard: Local Storage Class - create and list Fixes: https://tracker.ceph.com/issues/71460 Signed-off-by: Dnyaneshwari Talwekar <dtalwekar@redhat.com>
(cherry picked from commit 675057f4204acd454fd6f0b0064fcdba925f1f4a)
Naman Munet [Mon, 7 Jul 2025 09:26:49 +0000 (14:56 +0530)]
mgr/dashboard: differentiate account users from rgw users in bucket form
fixes: https://tracker.ceph.com/issues/71523
commit includes:
1) Added checkbox to select account user and another dropdown to show account users
2) Also fixed bucket replication as it was throwing error for 'invalidBucketARN'
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
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.
Bill Scales [Tue, 29 Apr 2025 13:33:02 +0000 (14:33 +0100)]
tentacle: crushtool: init with CINIT_FLAG_NO_DAEMON_ACTIONS
A change to mempool https://github.com/ceph/ceph/pull/55696 has
exposed a use after free bug in crushtool during process exit
where dtors are being called to free up mempool data structures
at the same time that the ceph context service thread is trying
to update them.
This commit modifies crushtool's initialization to prevent
this (unneeded) thread from being created. See issue for more
details about why the thread was not terminiating.
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>
(cherry picked from commit 97de817ad1c253ee1c7c9c9302981ad2435301b9)
N Balachandran [Mon, 30 Jun 2025 04:30:47 +0000 (10:00 +0530)]
rgw: fix aclRequired for bucket-logging
The aclRequired field in the bucket log is meant to indicate
that an acl was required to authorize the operation. This change
introduces a new field in the req_state to track whether an acl was
checked to authorize the request.
Fixes: https://tracker.ceph.com/issues/71730 Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
(cherry picked from commit 7ab070413cff8a6954142fa7855d6d258822eadf)
Patrick Donnelly [Fri, 27 Jun 2025 18:46:07 +0000 (14:46 -0400)]
mds: nudge log for unstable locks after early_reply
A getattr/lookup can cause a wrlock or xlock to become unstable after a request
(like rename) acquires it but before early reply. The MDS will not nudge the
log in this situation and the getattr/lookup will need to wait for the eventual
journal flush before the lock is released.
Patrick Donnelly [Fri, 27 Jun 2025 18:38:17 +0000 (14:38 -0400)]
mds: allow disabling batch ops
To address a bug and future ones where batching lookup/getattr does not help
"kick" the MDS in switching state more quickly (e.g. flushing the MDS journal).
Kyr Shatskyy [Wed, 7 May 2025 12:44:10 +0000 (14:44 +0200)]
qa/tasks/cephadm: override container image tags
By default, container image name is tagged by branch name or
by sha1, i.e. corresponding values suffixed ':' are appended
to the image value.
This patch allows to override the tagging just by providing
desired tag with the standard notation using ':' separator
in the container image parameter value of cephadm task.
Adam King [Wed, 28 May 2025 16:08:27 +0000 (12:08 -0400)]
mgr/cephadm: don't remove and deploy new daemon if ports change during upgrade
If we're not mid-upgrade, a port/ip change is most likely a user
changing the configuration for the daemon and starting a new
daemon with the new ports can be justified. During upgrade, their
are a number of different upgrade paths (espeically considering
our N+2 upgrade support) where something internal to cephadm
has made the ip we're binding to or the ports being used
change. In these cases, the process of upgrading the daemon
will resolve the issue. Howeverm by having the scheduler
unilaterally remove and deploy fresh versions of daemons
when it sees port changes, we may effectively "upgrade" some
daemons out of the intended order just to make the ports
match up. This was seen with nvmeof which needs to be upgraded
after the mon daemons, but was being removed and redeployed
after the mgr upgrade once cephadm saw the set of expected
ports had changed.
This patch adds a new "upgrade_in_progress" attribute to the
HostAssignment class in the scheduler to make it aware of
an ongoing upgrade. It also changes the behavior specifically
around whether a daemon matches another if the ports match
up when "upgrade_in_progress" was set to True.
James Oakley [Sun, 15 Jun 2025 15:04:35 +0000 (12:04 -0300)]
cephadm: Fix get_cluster_count when data_dir is missing
It is possible for cephadm, if it fails to create a cluster, to direct
the user to delete the cluster even though the data_dir has not yet been
created. Running that command would fail during the cluster count check.