]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/osd_support: move docs to docs/mgr/osd_support.rst
authorJoshua Schmid <jschmid@suse.de>
Thu, 30 Jan 2020 16:47:18 +0000 (17:47 +0100)
committerJoshua Schmid <jschmid@suse.de>
Wed, 19 Feb 2020 07:58:19 +0000 (08:58 +0100)
Signed-off-by: Joshua Schmid <jschmid@suse.de>
doc/mgr/index.rst
doc/mgr/osd_support.rst [new file with mode: 0644]
src/pybind/mgr/osd_support/module.py

index 159f95e3eec3f106b85606672c9e21ab19a58883..2a3116585c110edb4ac13ddd50a35511b0a3b5cd 100644 (file)
@@ -40,6 +40,7 @@ sensible.
     Telegraf module <telegraf>
     Telemetry module <telemetry>
     Iostat module <iostat>
+    OSD Support module <osd_support>
     Crash module <crash>
     Insights module <insights>
     Orchestrator module <orchestrator>
diff --git a/doc/mgr/osd_support.rst b/doc/mgr/osd_support.rst
new file mode 100644 (file)
index 0000000..fb1037c
--- /dev/null
@@ -0,0 +1,61 @@
+OSD Support Module
+==================
+The OSD Support module holds osd specific functionality that
+is needed by different components like the orchestrators.
+
+In current scope:
+
+* osd draining
+
+Enabling
+--------
+When an orchestrator is used this should be enabled as a dependency.
+(*currently only valid for the cephadm orchestrator*)
+
+The *osd_support* module is manually enabled with::
+
+  ceph mgr module enable osd_support
+
+Commands
+--------
+
+Draining
+########
+
+This mode is for draining OSDs gracefully. `Draining` in this context means gracefully emptying out OSDs by setting their
+weight to zero. An OSD is considered to be drained when no PGs are left.
+
+::
+
+  ceph osd drain $osd_id
+
+Takes a $osd_id and schedules it for draining. Since that process can take
+quite some time, the operation will be executed in the background. To query the status
+of the operation you can use:
+
+::
+
+  ceph osd drain status
+
+This gives you the status of all running operations in this format::
+
+  [{'osd_id': 0, 'pgs': 1234}, ..]
+
+If you wish to stop an OSD from being drained::
+
+  ceph osd drain stop [$osd_id]
+
+Stops all **scheduled** osd drain operations (not the operations that have been started already)
+if no $osd_ids are given. If $osd_ids are present it only operates on them.
+To stop and reset the weight of already started operations we need to save the initial weight
+(see 'Ideas for improvement')
+
+
+Ideas for improvement
+----------------------
+- add health checks set_health_checks
+- use objects to represent OSDs
+  - allows timestamps, trending information etc
+- save osd drain state (at least the osd_ids in the mon store)
+  - resume after a mgr crash
+  - save the initial weight of a osd i.e. (set to initial weight on abort)
index bbdebc16f3d85a0fe3c1852c780d494c6782216c..eba8259abd6b1192b31089fcb9b1a9833dcb4602 100644 (file)
@@ -4,40 +4,6 @@ from threading import Event
 import json
 import errno
 
-"""
-A module that holds a variety of useful utility to deal with OSDs
-
-Draining OSDs:
-
-This module can be used to drain osds from the commandline:
-
-$ ceph osd drain $osd_ids ([$osd_ids])
-
-You can monitor the progress with
-
-$ ceph osd drain status
-
-Gives you the status of scheduled and running osd drain operations
-
-[{'osd_id': 0, 'pgs': 1234}, ..]
-
-$ ceph osd drain stop ([$osd_ids])
-
-Stops all !SCHEDULED! osd drain operations (not the operations that have been started already)
-if no $osd_ids are give. If $osd_ids are present it only operates on them.
-To stop and reset the weight of already started operations we need to save the initial weight 
-(see 'Ideas for improvement')
-
-
-Ideas for improvement:
-- add health checks set_health_checks
-- use objects to represent OSDs
-  - allows timestamps, trending information etc
-- save osd drain state (at least the osd_ids in the mon store)
-  - resume after a mgr crash
-  - save the initial weight of a osd i.e. (set to initial weight on abort)
-"""
-
 
 class OSDSupport(MgrModule):
     # these are CLI commands we implement
@@ -59,14 +25,6 @@ class OSDSupport(MgrModule):
         },
     ]
 
-    # These are module options we understand.  These can be set with
-    #
-    #   ceph config set global mgr/hello/<name> <value>
-    #
-    # e.g.,
-    #
-    #   ceph config set global mgr/hello/place Earth
-    #
     MODULE_OPTIONS: List[dict] = []
 
     # These are "native" Ceph options that this module cares about.