From: Yaarit Hatuka Date: Wed, 6 Jul 2022 21:59:15 +0000 (+0000) Subject: mgr/telemetry: reset health warning after re-opting-in X-Git-Tag: v16.2.11~380^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ad7533b4a36bdb2961055ab5d3ddb1c0762da5e;p=ceph.git mgr/telemetry: reset health warning after re-opting-in When telemetry requires re-opting-in (whenever new data is available), a health warning is set by the module. This health warning should be reset once the user re-opts-in (with `ceph telemetry on`), but currently it might take longer. Fixing it here by waking up serve() immediately after re-opting-in, which will invoke refreshing health checks. Fixes: https://tracker.ceph.com/issues/56486 Signed-off-by: Yaarit Hatuka (cherry picked from commit b8bbf642c1bc985e5e08639f44adc0e0d7c686da) Conflicts: src/pybind/mgr/telemetry/module.py Conflicts were due to the new opt-in flow which was introduced in Quincy. --- diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 41b8a4b111c9..953e5c5f7983 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -787,6 +787,9 @@ class Module(MgrModule): self.set_module_option('enabled', True) self.set_module_option('last_opt_revision', REVISION) + # wake up serve() to reset health warning + self.event.set() + def off(self): self.set_module_option('enabled', False) self.set_module_option('last_opt_revision', 1)