John Mulligan [Wed, 6 Sep 2023 20:18:37 +0000 (16:18 -0400)]
doc/cephadm: clarify what cephadm component writes to the cluster log channel
Clarify that the cephadm orchestrator module, a part of the ceph mgr,
logs to the cluster log channel. This prepares for adding a specific
section to cover logging for the cephadm "binary".
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 6 Sep 2023 18:15:41 +0000 (14:15 -0400)]
cephadm: remember log destination used during bootstrap
Store the log destination(s) specified on the CLI for cephadm bootstrap
as the manager configuration, unless the configuration key is explicitly
set by the input config.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 6 Sep 2023 17:39:06 +0000 (13:39 -0400)]
mgr/cephadm: add a module option for controlling cephadm log dest
Now that cephadm has multiple possible persistent logging destinations
we need a way to choose which one to use when the command is started by
the mgr. Add the option 'cephadm_log_destination' which can take one
of 'file', 'syslog', or 'file,syslog'. If left unset (empty string)
then the behavior is equivalent to 'file' and that is the same as
previous cephadm versions.
Fixes: https://tracker.ceph.com/issues/62233 Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Tue, 22 Aug 2023 19:11:35 +0000 (15:11 -0400)]
cephadm: add cli option to enable logging to syslog
Add the --log-dest option to cephadm. The --log-dest option can be
specified 0, 1 or more times. If unspecified, cephadm will log to
the default location, the log file. If specified one ore more times,
each instance will enable the named logging destination.
Example:
John Mulligan [Tue, 22 Aug 2023 19:11:16 +0000 (15:11 -0400)]
cephadm: add support for logging to syslog/journal
Add support to logging.py for persistent logging to syslog and thus to
journald. This is accomplished by switching logging handlers depending
on the log_dest attribute of the context. Setting this value is left
for a future patch.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Tue, 22 Aug 2023 16:42:14 +0000 (12:42 -0400)]
cephadm: move colored output support into logging.py
Rewrite cephadm's colored output support such that it abstracts away
the colorization into extra logging metadata. The new code will not
unconditionally put control characters into the log files. It will
only print the control chars if the stderr is a tty.
In theory this is probably more future proof as well, but it's only
got two callers so it is hard to say how useful it'll be.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
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.
Myoungwon Oh [Thu, 31 Aug 2023 02:43:24 +0000 (11:43 +0900)]
crimson/os/seastore/cbj: fix a potential overflow bug
CircularBoundedJournal is similar to circular queue, so segment_seq
increases after rolling. However, current implementation always
increases segment_seq_t when rolling occurs, resulting in
the overflow if segment_seq_t hits MAX_SEG_SEQ.
To mitigate this, this commit changes the type of the segment_seq_t
to uint64_t.
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>