blk/KernelDevice: Fix several issues with stopping discard threads
1. In _discard_stop(), the wait for !discard_threads.empty() was there
from a prior implementation where there could theoretically be a race
between _discard_start() and _discard_stop(). If that race does
exist, this check won't help; not only is _discard_stop() not called
if discard_threads is empty, but discard_threads won't be populated
until _discard_start() runs and thus this won't detect such a race.
2. Calling _discard_stop() from handle_conf_change() is a guaranteed
deadlock because discard_lock is already held, so don't do that. Use
the same flow whether we're stopping a subset of threads or all
threads.
3. Asking a subset of discard threads to stop was not guaranteed to take
effect, since if they continued to find contents in discard_queue
then they would continue to run indefinitely. Add additional logic to
_discard_thread() to have threads stop if they have been requested to
stop and other threads exist to continue draining discard_queue.
4. Make the flow of _discard_stop() and handle_conf_change() more
similar.
blk/KernelDevice: React to bdev_enable_discard changes in handle_conf_change()
This fixes two issues that were introduced by 755f3e03b5bf547cfd940b52a53833f66285062b:
1. After an OSD boots, discard threads were not stopped when
bdev_enable_discard was set to false, whereas that was the intent of
that commit.
2. If bdev_enable_discard or bdev_async_discard_threads are configured
with a mask that can't be evaluated at OSD boot (e.g. a device
class), then async discard won't be enabled until a later config
change to bdev_async_discard_threads.
qa/tasks: Initialize 'monitoring_profiles' spec to an empty dict
Initialize 'monitoring_profiles' to an empty python dictionary instead of
'None' to prevent the cbt task from failing due to the TypeError exception
when attempting to iterate a 'NoneType'.
Merge pull request #58092 from zdover23/wip-doc-2024-06-18-start-os-recs
doc/start: remove mention of Centos 8 support
Reviewed-by: Adam King <adking@redhat.com> Reviewed-by: Dan Mick <dan.mick@redhat.com> Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com> Reviewed-by: Ken Dreyer <kdreyer@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Repair the link to cephfs-shell.rst in doc/cephfs/cephfs-shell.rst that
was broken in https://github.com/ceph/ceph/pull/41165/ when
doc/cephfs/cephfs-shell.rst was moved to doc/man/8/cephfs-shell.rst.
This commit is made in response to a request by Lander Duncan that was
made on the [ceph-users] mailing list, and can be seen here: https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/F7V4CWLIYCAJ4JXI2JLNY6QPCFPR4SLA/
Xiubo Li [Mon, 4 Mar 2024 03:38:28 +0000 (11:38 +0800)]
mds/client: return -ENODATA when xattr doesn't exist for removexattr
The POSIX says we should return -ENODATA when the corresponding
attribute doesn't exist when removing it. While there is one
exception for the acl ones in the local filesystems, for exmaple
for xfs, which will treat it as success.
While in the MDS side there have two ways to remove the xattr:
sending a CEPH_MDS_OP_SETXATTR request by setting the 'flags' with
CEPH_XATTR_REMOVE and just issued a CEPH_MDS_OP_RMXATTR request
directly.
For the first one it will always return 0 when the corresponding
xattr doesn't exist, while for the later one it will return
-ENODATA instead, this should be fixed in MDS to make them to be
consistent.
Added a CEPH_XATTR_REMOVE2 new flags and will return -ENODATA errno
directly when the crresponding xattr doesn't exist. Just keeps the
old CEPH_XATTR_REMOVE flags to make it to be compatible with old
clients.
Fixes: https://tracker.ceph.com/issues/64679 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Venky Shankar [Thu, 27 Jun 2024 16:34:37 +0000 (22:04 +0530)]
Merge PR #57619 into main
* refs/pull/57619/head:
qa/cephfs: use wait_for_daemon() instead of sleep()-ing
qa/cephfs: mark file system joinable for fs rename tests before unmounting clients
Venky Shankar [Thu, 27 Jun 2024 14:28:50 +0000 (19:58 +0530)]
Merge PR #53755 into main
* refs/pull/53755/head:
PendingReleaseNotes: add note about CephFS set_vxattrs
doc/cephfs: Update docs to match remove functionality and respective vxattrs
qa: Add test coverage for vxattr behavior
qa: Add removexattr to support setfattr removal.
mds: Implement remove for ceph vxattrs
After rollback started being tested in commit b3977c53c930
("test/librbd: make rollback in TestGroup.add_snapshot{,PP}
meaningful"), these tests can fail on comparing post-rollback
data to expected data if run with exclusive lock disabled.
This doesn't occur with exclusive lock enabled because the RBD
cache gets invalidated implicitly before releasing the lock.
While at it, pass LIBRADOS_OP_FLAG_FADVISE_FUA to avoid relying
on any cache settings that happen to be in effect.
Adam King [Tue, 6 Feb 2024 00:18:00 +0000 (19:18 -0500)]
mgr/cephadm: move alertmanager crt/key to cert store
We weren't actually even storing these before, but
given we want to be able to offer some more cert
management options in the future, it's good to start
doing so
Adam King [Mon, 22 Jan 2024 17:37:19 +0000 (12:37 -0500)]
mgr/cephadm: add a Cert/Key tracking/storage class
The idea is to move storage/handling of certs from any misc.
spot in the mgr/cephadm codebase into a single class. This will
make it much easier to do things with the certs we have in
the future.
Pere Diaz Bou [Wed, 26 Jun 2024 13:57:47 +0000 (15:57 +0200)]
doc/rados: update how to install c++ header files
In this example librados2-devel only install C header files on fedora 40,
therefore I added libradospp-devel to the command to include C++ header files.
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
Nizamudeen A [Wed, 26 Jun 2024 13:22:40 +0000 (18:52 +0530)]
mgr/dashboard: fix clone async validators with different groups
Providing a way to dynamically update the async validator based on the
selector field so that when the selected value changes, the depended
field like the clone name gets validated again against the new value
Fixes: https://tracker.ceph.com/issues/66703 Signed-off-by: Nizamudeen A <nia@redhat.com>
Xuehan Xu [Fri, 14 Jun 2024 10:35:05 +0000 (18:35 +0800)]
crimson/os/seastore/cache: add an efficient method to check if extents are
viewable to transactions
Instead of searching the transaction's retired_set to determine whether
an extent has been retired, we add the transaction that's retiring an
extent to that extent's retired_transactions field and search that field
to do the check. Since the probability of multiple transactions retiring
the same extent is very low, this approach should be more cpu efficient.
Casey Bodley [Mon, 24 Jun 2024 15:23:36 +0000 (11:23 -0400)]
dout: add macros for libfmt-style logging
new dout macros use fmt::print() to write output directly to the
underlying ostream. this enables libfmt's printf-style formatting syntax
for ceph log output, without the string allocation overhead of:
Patrick Donnelly [Tue, 25 Jun 2024 16:27:28 +0000 (12:27 -0400)]
Merge PR #53503 into main
* refs/pull/53503/head:
qa: add tests for `mds last-seen` command
doc/cephfs: add documentation for `mds last-seen`
PendingReleaseNotes: add note on last-seen command
mon/MDSMonitor: add command to lookup when mds was last seen
mon/MDSMonitor: set birth time on FSMap during encode
pybind/mgr/dashboard: show context diff for openapi check