mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
mgr/osd_support: move docs to docs/mgr/osd_support.rst
Signed-off-by: Joshua Schmid <jschmid@suse.de>
This commit is contained in:
parent
b5c5ef185d
commit
c9b9e57967
@ -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>
|
||||
|
61
doc/mgr/osd_support.rst
Normal file
61
doc/mgr/osd_support.rst
Normal file
@ -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)
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user