From fe8385a482b606fe94ac0872ba7306220d858803 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Fri, 30 Oct 2020 09:22:30 +0100 Subject: [PATCH] mgr/cephadm: Allow customizing mgr/cephadm/lsmcli_blink_lights_cmd per host * Rename key name from 'lsmcli_blink_lights_cmd' to 'blink_device_light_cmd' * Refactor TemplateMgr::render() method to use the Ceph common behavior how to name store/module option keys. The old implementation required a key like 'mgr/cephadm/services_nfs_ganesha.conf' instead of 'mgr/cephadm/services/nfs/ganesha.conf' or 'mgr/cephadm/mgr0_blink_device_light_cmd' instead of 'mgr/cephadm/mgr0/blink_device_light_cmd'. Fixes: https://tracker.ceph.com/issues/48041 Signed-off-by: Volker Theile (cherry picked from commit cd79c9912ab35ee6296d613edc7830410a141e05) Conflicts: doc/rados/operations/devices.rst --- doc/rados/operations/devices.rst | 17 +++++++++++ src/pybind/mgr/cephadm/module.py | 29 +++++++++---------- src/pybind/mgr/cephadm/template.py | 19 ++++++++++-- ...ights_cmd.j2 => blink_device_light_cmd.j2} | 0 src/pybind/mgr/cephadm/tests/test_cephadm.py | 18 ++++++++++-- 5 files changed, 64 insertions(+), 19 deletions(-) rename src/pybind/mgr/cephadm/templates/{lsmcli_blink_lights_cmd.j2 => blink_device_light_cmd.j2} (100%) diff --git a/doc/rados/operations/devices.rst b/doc/rados/operations/devices.rst index 98691a043d49b..5e35a3a670558 100644 --- a/doc/rados/operations/devices.rst +++ b/doc/rados/operations/devices.rst @@ -47,6 +47,23 @@ By default, the `identification` light is used. ceph orch status +The command behind the scene to blink the drive LEDs is `lsmcli`. If you need +to customize this command you can configure this via a Jinja2 template:: + + ceph config-key set mgr/cephadm/blink_device_light_cmd "