Ronen Friedman [Fri, 1 Dec 2023 14:48:49 +0000 (08:48 -0600)]
tests/scrub: deactivate osd-scrub-dump stand-alone test
as the scrub reservation changes had made it obsolete.
Note - it is not an issue of fixing the test, but rather
that the tested functionality is no longer there.
Ronen Friedman [Thu, 30 Nov 2023 06:35:29 +0000 (00:35 -0600)]
osd/scrub: handling unexpected scrub requests
if arriving while still handling a previous chunk request,
the handling of of the previous chunk request will be aborted.
No response is sent. The scrubber resets, then handles the new request.
Ronen Friedman [Mon, 13 Nov 2023 07:09:45 +0000 (01:09 -0600)]
osd/scrub: decouple being reserved from handling scrub requests
For a replica, following this change:
* 'ReplicaActive' captures the state of the scrubber when
acting as a replica, from peering to interval change;
* "being reserved" is just a flag maintained by ReplicaActive, and
is no longer a prerequisite for handling scrub requests.
* each scrub request is now associated with its own 'token' value.
and the following minor simplification:
* the 'should we wait for pushes' decision is now part of the
code executed on the transition from ReplicaIdle into ReplicaActiveOp.
StartReplicaNoWait can now be discarded.
Ronen Friedman [Sun, 12 Nov 2023 15:25:22 +0000 (09:25 -0600)]
osd/scrub: maintain a set of remote reservations
... instead of a simple counter.
This - as a preparation for the next commit, which will decouple
the "being reserved" state from the handling of scrub requests.
The planned changes to the scrub state machine will make
it harder to know when to clear the "being reserved" state.
The changes here would allow us to err on the side of caution,
i.e. trying to "un-count" a remote reservation even if it was not
actually reserved or was already deleted.
Ronen Friedman [Sun, 12 Nov 2023 11:12:31 +0000 (05:12 -0600)]
osd/scrub: fix replica sub-states
The replica states hierarchy was not properly specified.
Fixing it here.
Also - removing the (never yet invoked) call to
replica_handling_done() in the replica state machine.
That call must precede the reply to the Primary.
John Mulligan [Tue, 14 Nov 2023 00:15:25 +0000 (19:15 -0500)]
cephadm: workaround issues running cephadm with relative path
Implement a workaround for the jinja2 package loader not correctly
finding a template inside the cephadmlib package when run as
a zipapp. See docstring in the shim class for more details.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
'ceph-volume raw list' is broken for a specific use case (rook).
rook copies devices from /dev/ to /mnt for specific/internal needs.
when ceph-volume raw list is passed a device from /mnt then
ceph-volume ignores it and return an empty dict.
That prevent rook from creating OSDs properly.
Ronen Friedman [Thu, 9 Nov 2023 15:21:42 +0000 (09:21 -0600)]
tests/standalone: fix scrub-related tests following command changes
Using
ceph tell $pgid [deep]-scrub
to initiate an 'operator initiated' scrub, and
ceph tell $pgid schedule[-deep]-scrub
for causing a 'periodic scrub' to be scheduled.
mgr/cephadm: Expose nvmeof gateway configuration parameters through specifications
- min_controller_id, max_controller_id: Enable the specification of minimum and maximum controller IDs utilized by the SPDK.
Having distinct controller IDs is vital for configuring multipath setups.
- enable_spdk_discovery_controller: Manage whether the SPDK or ceph-nvmeof discovery service is employed. The default value is set to False.
Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
Zac Dover [Tue, 14 Nov 2023 13:40:42 +0000 (23:40 +1000)]
doc/glossary: add "Quorum" to glossary
Add the term "Quorum" to the glossary and link to the part of
architecture.rst concerning Monitors. The sticky header at the top of
the docs.ceph.com website gets in the way of the location linked to in
this commit, but fatigue and disgust prevent me from spending time today
trial-and-erroring my way through the hostile and ill-documented
wilderness of scroll-margin so that the link goes where it should.
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com> Signed-off-by: Zac Dover <zac.dover@proton.me>
John Mulligan [Sun, 5 Nov 2023 17:57:45 +0000 (12:57 -0500)]
cephadm: eliminate the _update_pids_limit function
Eliminate the _update_pids_limit function by moving the logic into the
various daemon type classes `customize_container_args` functions allow
each class to decide if it needs to run with unlimited-pids or not.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sun, 5 Nov 2023 16:44:48 +0000 (11:44 -0500)]
cephadm: use class methods when setting up ceph based daemon containers
Now that the ceph and ceph exporter classes have all the necessary
methods, rework the get_container function to use those class methods
in a common manner.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sat, 21 Oct 2023 00:18:36 +0000 (20:18 -0400)]
cephadm: add container envs methods to ceph and ceph exporter classes
These, currently unused, methods will be used in a subsequent change to
move logic for setting up containers out of the get_containers function
into the daemon type classes in a common way.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sun, 5 Nov 2023 16:12:54 +0000 (11:12 -0500)]
cephadm: add methods to ceph daemon type class
Add unused methods to the ceph class in order to prepare for moving
the logic for setting up the various ceph deaemon types to be
handled by the class.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sun, 5 Nov 2023 16:09:27 +0000 (11:09 -0500)]
cephadm: add more ContainerDeamonForm methods to the monitoring class
Add methods customize_{container_args,process_args} & default_entrypoint
to the monitoring daemon type class. Use those methods in the
get_container function.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sun, 5 Nov 2023 16:00:54 +0000 (11:00 -0500)]
cephadm: add more ContainerDeamonForm methods to the tracing class
Add methods customize_{container_envs,process_args} & default_entrypoint
to the tracing daemon type class. Use those methods in the get_container
function.
This change tries to adapt to, but not fix, the rather strange
set_configuration static method that side-effects the class's(!)
property.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sun, 5 Nov 2023 13:09:10 +0000 (08:09 -0500)]
cephadm: add more ContainerDeamonForm methods to the nfs class
Add methods customize_{container_envs,process_args} & default_entrypoint
to the nfs daemon type class. Use those methods in the get_container
function.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sun, 5 Nov 2023 12:18:55 +0000 (07:18 -0500)]
cephadm: add more ContainerDeamonForm methods to the custom container class
Add methods customize_{process_args,container_envs,container_args} and
default_entrypoint to the custom container daemon type class. Use those
methods in the get_container function.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Tue, 7 Nov 2023 22:57:43 +0000 (17:57 -0500)]
cephadm: update additional container daemon form base class methods
Fix the function signature for the previously added stub
customize_container_args.
Add methods for customize_process_args and customize_container_envs.
The "process args" are args passed to the daemon process / entrypoint.
Container args are passed to the container engine.
Add a default_entrypoint method to return the default entrypoint for
a particular daemon-in-container.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
and it placed the node-exporter daemons on vm-00
and vm-02 but not vm-01. Obviously there are more
advanced scenarios that justify this than listing
two hosts, but using "|" as an OR like that is an
example of something you can't do with the fnmatch
version of the host pattern
Ramana Raja [Thu, 2 Nov 2023 21:44:10 +0000 (17:44 -0400)]
pybind/mgr: remove __del__() of mgr modules
It's strongly recommended for objects that have references to
external resources (e.g., files) to explicitly release them.
Python doesn't guarantee garbage collection of objects and hence
doesn't guarantee freeing of external resources that occur on
garbage collection.
The __del__() methods in the python mgr modules may not even be
called since garbage collection of objects is not guaranteed in python.
And some of the __del__() methods try to cleanup that seem redundant.
- In volumes/module.py, vc.shutdown() is called in Module.shutdown().
No need to call it again in Module.__del__()
- In telegraf/basesocket.py, BaseSocker.close() is called in
BaseSocket.__exit__(). No need to call it again in
BaseSocket.__del__().
- In mgr_module.py, MgrModuleLoggingMixin._unconfigure_logging() is
called in MgrModule.__init__() and MgrStandbyModule.__init__(). No
need to call it in MgrModule.__del__() and
MgrStandbyModule.__del__().|
- In dashboard/services/cephfs.py, the libcephfs mount is not
shutdown explicitly by the mgr module. However, the cython libcephfs
bindings has a LibCephFS.__dealloc__() finalizer method that calls
LibCephFS.shutdown(). This should unmount and cleanup the ceph mount
handle.
Remove the __del__() of the python mgr modules.
Fixes: https://tracker.ceph.com/issues/63421 Signed-off-by: Ramana Raja <rraja@redhat.com>
Zac Dover [Mon, 13 Nov 2023 10:57:07 +0000 (20:57 +1000)]
doc/rados: format "initial troubleshooting"
Format the steps in the "Initial Troubleshooting" section of
doc/rados/troubleshooting/troubleshooting-mon.rst. A near-future PR (not
this one) will add context to this section and explain that the steps
described here are the first steps that you should undertake when you
determine that you have an unresponsive or down Monitor. This PR is
merely for formatting.
The operation's id and future returned when starting SnapTrimObjSubEvent
is emplaced into subop_blocker.
Later on, we await the completion of all the started operations futures.
Before this patch, we only stored the op id in the subop_blocker vector
which allowed `op` to go out of scope and lose all its references
(and get deleted) before exiting.
Storing the operation as a reference instead of the id
will maintain the SnapTrimObjSubEvent operation lifetime.
Zac Dover [Sun, 12 Nov 2023 10:52:09 +0000 (20:52 +1000)]
doc/rados: parallelize t-mon headings
Give parallel structure to the questions in the Q&A section of the "The
Cluster Has Quorum But At Least One Monitor Is Down" subsection of the
"Most Common Monitor Issues" section of
doc/rados/troubleshooting/troubleshooting-mon.rst.
Zac Dover [Sun, 12 Nov 2023 10:21:41 +0000 (20:21 +1000)]
doc/config: edit "ceph-conf.rst"
Edit the first section of doc/rados/configuration/ceph-conf.rst.
Initially I just wanted to change "series" to "set", but once I got my
hands dirty I ended up simplifying some sentences.
John Mulligan [Sat, 4 Nov 2023 23:41:25 +0000 (19:41 -0400)]
cephadm: change ceph & exporter to customize_container_mounts method
Unlike the other types Ceph and CephExporter share the underlying
method. There was no other use of get_container_mounts on the class
so it could be converted to be customize_container_mounts.
Because there's an extra arg that passes from get_container_mounts
top-level function to Ceph.get_ceph_mounts, that function was not
changed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sat, 4 Nov 2023 22:39:07 +0000 (18:39 -0400)]
cephadm: move volume mounts assignment to a variable
Move the call to get_container_mounts out of the function call block.
This will aid with the next refactoring steps, so that the uses
of get_container_mounts can be brought into the get_container call
directly.
Signed-off-by: John Mulligan <jmulligan@redhat.com>