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>
Problem:
The pg_autoscaler `noautoscale flag` doesn't retain individual pool states of
`autoscale mode`. For example turn the flag `ON` and then `OFF` again all
the pools will have `autoscale mode on` which is inconvenience for the user
because sometimes the user just want to temporary disable the autoscaler on
all pools and will enable it back after a period of time while retaining
individual pool states of `autoscale mode`
Solution:
We store noautoscale flag in the OSDMAP such that it is
persistent. We then get rid of noautoscale MODULE OPTION
in the pg_autoscaler module since we do not need it anymore.
Everytime we set, unset or get the flag we rely on looking up
the OSDMAP, we did this because we want to avoid inconsistancy
between the `noautoscale flag`. This is because `noautoscale flag`
can easily be set by doing `ceph osd set noautoscale`.
Fixes: https://tracker.ceph.com/issues/61922
Signed-off-by: Kamoltat <ksirivad@redhat.com>
The "ceph config dump" command without the json formatted output shows
the localized option names and their values. An example of a normalized
vs localized option is shown below:
Normalized: mgr/dashboard/ssl_server_port (maintaned within Option struct)
Localized: mgr/dashboard/x/ssl_server_port (maintained in mon store)
But the "ceph config dump --format json*" output showed the normalized
option names which was not consistent with the "config dump" output.
The output of the command along with variations for pretty printing must
show the same content.
This commit introduces a new member within the ConfigMap's MaskedOption
struct called "localized_name". This is initialized to the localized name
as part of ConfigMonitor::load_config() method.
The MaskedOption::dump() used for the json formatting is modified to
display the localized_name instead of the normalized name.
Fixes: https://tracker.ceph.com/issues/62379
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
OSD has a wierd handling of ops when window is full.
Make window size adaptation really-really simple.
Now window is set to 1.5 * captured ops.
Window is never shortened.
Deleted unused code that related to periodic window size update.
Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
fixup
Signed-off-by: Adam Kupczyk <akupczyk@ibm.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>