From d27d7517cc3466ef62380eb3e06427668b70ce0e Mon Sep 17 00:00:00 2001 From: Yaarit Hatuka Date: Wed, 6 Jul 2022 21:59:15 +0000 Subject: [PATCH] mgr/telemetry: reset health warning after re-opting-in MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When telemetry requires re-opting-in (either whenever new collections which require nagging are available, or on major upgrades) 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) --- src/pybind/mgr/telemetry/module.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index ea97df47741ba..bff9b843ee71b 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -1579,6 +1579,9 @@ To enable, add '--license {LICENSE}' to the 'ceph telemetry on' command.''' msg = f"{msg}\nSome channels are disabled, please enable with:\n"\ f"`ceph telemetry enable channel{disabled_channels}`" + # wake up serve() to reset health warning + self.event.set() + return 0, msg, '' @CLICommand('telemetry off') -- 2.39.5