At this phase of the refactoring:
this is the main interface from the scrub scheduler in OsdScrub
to the ScrubQueue. The ScrubQueue provides the ordered list of
all targets (for now - PGs) that are ready for scrubbing.
Scrub initiation code is modified to use the new interface.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
from ScrubQueue::select_pg_and_scrub().
Clearing the path to moving some ScrubQueue methods into
OscScrub. Starting here with the CPU load tracker.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
... (as OsdScrub::initiate_scrub()).
The random backoff dice roller (scrub_random_backoff())
is moved as well.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
for all OSD scrub things.
For now: OsdScrub is mostly a forwarder to the ScrubQueue object
(which it now owns).
The resource counters moved into a separate object within OsdScrub.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
set_reserving_now() can now return a failure status, indicating
a race between two PGs to start scrubbing on the same OSD.
The scrubber FSM is modified to handle the failure.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Renaming ScrubPreconds, the collection of "environmental"
restrictions on possible scrubs, to OSDRestrictions.
Also - providing fmtlib support for that structure.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
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>
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>
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>
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:
```
cephadm boostrap
cephadm --log-dest=syslog bootstrap
cephadm --log-dest=file bootstrap
cephadm --log-dest=syslog --log-dest=file bootstrap
```
Signed-off-by: John Mulligan <jmulligan@redhat.com>
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>
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>
with dbstore, the manifest_bl pointer was null; check for null before
dereferencing for read_manifest_parts()
Fixes: https://tracker.ceph.com/issues/62378
Signed-off-by: Casey Bodley <cbodley@redhat.com>
* refs/pull/52892/head:
qa: add test to validate periodic checks by async threads
mgr/volumes: periodically check for async work
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
* refs/pull/52755/head:
mds: adjust pre_segments_size for MDLog when trimming segments for standby-replay
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
doc/dev: Fix typos in cephfs-mirroring.rst and deduplication.rst
Reviewed-by: Zac Dover <zac.dover@proton.me>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Typo Error in Doc cephfs-mirroring.rst , replace RAODS with RADOS
Typo Error in Doc deduplication.rst , replace RAODS with RADOS
Signed-off-by: Daniel Parkes <dparkes@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>
the function returned an integer error code, but two callers were
incorrectly testing the return value as a boolean
the function just returns placement ids that are in-memory, so none of
the drivers have a failure case; change the return value to void
Fixes: https://tracker.ceph.com/issues/62771
Signed-off-by: Casey Bodley <cbodley@redhat.com>
The new encoder types broke building the cls test on newer gcc (13+) due
to undefined encoder/decoder. Add the file that defines those to the
test.
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;
~~~~~~~~~~~~~~~~~~~~^~~
Signed-off-by: cuiming <cuiming_yewu@cmss.chinamobile.com>