3 The OSD Support module holds osd specific functionality that
4 is needed by different components like the orchestrators.
12 When an orchestrator is used this should be enabled as a dependency.
13 (*currently only valid for the cephadm orchestrator*)
15 The *osd_support* module is manually enabled with::
17 ceph mgr module enable osd_support
25 This mode is for draining OSDs gracefully. `Draining` in this context means gracefully emptying out OSDs by setting their
26 weight to zero. An OSD is considered to be drained when no PGs are left.
30 ceph osd drain $osd_id
32 Takes a $osd_id and schedules it for draining. Since that process can take
33 quite some time, the operation will be executed in the background. To query the status
34 of the operation you can use:
40 This gives you the status of all running operations in this format::
42 [{'osd_id': 0, 'pgs': 1234}, ..]
44 If you wish to stop an OSD from being drained::
46 ceph osd drain stop [$osd_id]
48 Stops all **scheduled** osd drain operations (not the operations that have been started already)
49 if no $osd_ids are given. If $osd_ids are present it only operates on them.
50 To stop and reset the weight of already started operations we need to save the initial weight
51 (see 'Ideas for improvement')
55 ----------------------
56 - add health checks set_health_checks
57 - use objects to represent OSDs
58 - allows timestamps, trending information etc
59 - save osd drain state (at least the osd_ids in the mon store)
60 - resume after a mgr crash
61 - save the initial weight of a osd i.e. (set to initial weight on abort)