The CI appears to be really slow, and even a second of wait for inotify
sometimes fails. Add an exponential backoff wait of up to ~25 seconds
to hopefully make the test pass reliably.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
rectify src/auth/cephx/CephxProtocol.cc 1 warning
with the variable 'ch' Used before initialized
auth/cephx/CephxProtocol.cc:595:57: warning: '*((void*)& ch +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
msg.server_challenge_plus_one = ch.server_challenge + 1;
~~~~~~~~~~~~~~~~~~~~^~~
Patrick Donnelly [Fri, 15 Sep 2023 16:11:37 +0000 (12:11 -0400)]
Merge PR #52199 into main
* refs/pull/52199/head:
mds: continue linking if targeti is temporarily located in stray dir
Revert "mds: wait unlink to finish to avoid conflict when creating same dentries"
Revert "mds: clear the STATE_UNLINKING state when the unlink fails"
Revert "mds: wait reintegrate to finish when unlinking"
Revert "mds: notify the waiters in replica MDSs"
Revert "mds: wait the linkmerge/migrate to finish after unlink"
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This is the MVP for a driver for RGW that operates on top of a POSIX
filesystem. It supports get, put, list, copy, multipart, external
access via the filesystem itself, and ordered bucket listings via an
LRU-based cache.
Note that this is currently a Filter, indended to run on top of dbstore.
This is because it currently doesn't have any User implementation, so it
depends on dbstore's User. Everything else is implemented in
POSIXDriver. Once there is a User implementation, this will become a
Store, instead of a Filter.
Commit messages from bucket listing cache:
rgw/posixdriver: recycle lmdb database handles as required
While LMDB workflows often do not close/return database handles,
ours continually reuses them. This requires us to close each
handle (atomically) when a cache entry is recycled.
rgw/posixdriver: don't instantiate bucket cache entries from notify events
rgw/posixdriver: incorporate lmdb-safe for now
The current inclusion is based on https://github.com/Martchus/lmdb-safe,
which is actively maintained but currently has some packaging issues the
author has agreed to accept fixes for.
For now, skip the submodule to save time and remove an external dependency.
rgw/posixdriver: fix listing of cached, empty bucket
* check lmdb enumeration result in all cases and w/better style
* add unit test for enumeration of an empty cached directory
rgw/posixdriver: nest lmdbs in a directory under the dbroot path to avoid cleanup issues
rgw/posixdriver: refactor for posix integration
* Derive BucketCache types as templates on a SAL driver and SAL
bucket pair.
* Integrate cache fills as callbacks into SAL layer (or mock, for
tests)
* Renaming and cleanups
rgw/posixdriver: add bucket cache implementation and tests
Adds free-standing cache of buckets and object names, with
bucket names (and listing attributes, upcoming) managed in
a hashed set of lmdb databases, which provides ordering and
a high-performance listing cache.
An framework for notification on new object creation (e.g.,
outside S3 workflow) is provided, and a Linux implementation
using inotify.
FindLMDB.cmake taken with attribution and license.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com> Signed-off-by: Ali Maredia <amaredia@redhat.com> Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* refs/pull/53070/head:
PendingReleaseNotes: add note about 'm' and 'M' periods
doc/cephfs: add note about monthly scheduling and retention period
qa: update minute period multiplier to m
qa: change minute duration specifier from M to m
mgr/snap_schedule: change minute duration specifier from M to m
Milind Changire [Thu, 24 Aug 2023 02:17:46 +0000 (07:47 +0530)]
mgr/snap_schedule: change minute duration specifier from M to m
Problem:
As per the issue tracker, the period spec specifier 'M' is not
consistent with what is used elsewhere, like the period specifiers
displayed in the 'ceph status' command output.
The 'M' period specifier is used as a 'minute' level period specifier by
the cephfs team.
The issue reporter suggests to use 'M' as a 'month' period specifier.
Solution:
Since the 'minute' level period specifer, 'M', is used internally by
the development team, it is failrly easy to swap the 'minute' ('M')
level and 'month' ('m') level period specifers to finally mean that 'm'
implies 'minute' level period and 'M' implies 'month' level period.
Also, since this is the first time that somebody has ever reported that
neither the 'M' nor the 'm' level specifiers work in production, it is a
good idea to fix them once and for all.
Myoungwon Oh [Fri, 25 Aug 2023 08:55:36 +0000 (17:55 +0900)]
crimson/os/seastore/object_data_handler: consider a RBM case when checking if write can be merged
RBM's paddr always indicates physical address, which means it doesn't have the dealayed.
So, this commit adds a condition that checks if given paddr is used for ongoing write.
Xiubo Li [Wed, 30 Aug 2023 05:24:01 +0000 (13:24 +0800)]
mds: continue linking if targeti is temporarily located in stray dir
If one inode has more than one hardlink and after the primary dentry
is unlinked it will located the inode in the stray dir temporarily,
which is pending reintegration.
Just before the linkmerge/migrate is triggered a link request comes
it will fail with -EXDEV.
Just skip it and continue the linking.
Fixes: https://tracker.ceph.com/issues/56695 Signed-off-by: Xiubo Li <xiubli@redhat.com>
John Mulligan [Wed, 26 Jul 2023 17:24:36 +0000 (13:24 -0400)]
cephadm: convert get_container_mounts to use a DaemonIdentity argument
Convert get_container_mounts to use a DaemonIdentity argument, and in
order to do so: split get_container_mounts_for_type out of
get_container_mounts. get_container_mounts will take a DaemonIdentity
and safely assume that the fsid, daemon_type, daemon_id triple is
available whereas get_container_mounts_for_type has the functionality
of only requiring the fsid and daemon_type.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Laura Flores [Fri, 8 Sep 2023 17:49:01 +0000 (17:49 +0000)]
src/common: add context to tracing::Tracer::init
Followup to https://github.com/ceph/ceph/pull/50948. This wasn't originally
caught since the centos 8 default build passed, but it did fail the
crimson build: https://shaman.ceph.com/builds/ceph/wip-yuri3-testing-2023-08-15-0955/b5259484dbc61e8573f27e692560c6c107b9d4c1/
Fixes: https://tracker.ceph.com/issues/62761 Signed-off-by: Laura Flores <lflores@ibm.com>
John Mulligan [Tue, 25 Jul 2023 20:46:01 +0000 (16:46 -0400)]
cephadm: split get_unit_name into two functions
The previous version of get_unit_name was effectively overloaded,
so that you could pass either an fsid, daemon_type, & daemon_id OR
pass an fsid and a "daemon_type" only that wasn't actually a daemon_type
but rather the instance name of the systemd service. Separate the
two use cases into two functions, making the naming more correct and
the code more audit-able overall.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Tue, 25 Jul 2023 20:23:34 +0000 (16:23 -0400)]
cephadm: use DaemonIdentity in arguments to CephContainer.for_daemon
Previously, the CephContainer.for_daemon took separate arguments for
fsid, daemon_type, & daemon_id. Now that we have a dedicated type
for encapsulating those values, switch for_daemon to take
a DaemonIdentity instead.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Tue, 25 Jul 2023 18:08:52 +0000 (14:08 -0400)]
cephadm: split DaemonSubIdentity class off from DaemonIdentity
Split DaemonSubIdentity into it's own subclass of DaemonIdentity
in order to better use the type system for validation and clarity.
DaemonIdentity loses the `subcomponent` field so that there's no
mistaking a DaemonIdentity with a DaemonSubIdentity.
This will make a lot more sense once there are more uses of
DaemonSubIdentity in the codebase.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
RadosGW API: incorrect bucket quota in response to HEAD /{bucket}/?usage
When we try to get the bucket usage via various methods, through curl or while accessing rgw api endpoint at HEAD /{bucket}/?usage doesn't return the updated information. The endpoint was always returning the user quota and not the actual bucket quota which we see after querying the endpoint.
John Mulligan [Tue, 5 Sep 2023 18:18:45 +0000 (14:18 -0400)]
cephadm: remove duplicates when listing files in scan
Fix running tox env flake8 during a rebase/merge where git ls-files
may return duplicate file names.
An earlier version of this change used the `--deuplicate` option to `git
ls-files` in order to remove duplicate files listed when running the
tool during rebase/merge. Mysteriously, this seemed to break the `ceph
API tests` in the CI. A completely unrelated command in a tox file that,
AFAIK, is not executed in that test suite. They ways of git are
subtle and often sucky.
Signed-off-by: John Mulligan <jmulligan@redhat.com>