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 <yaarit@redhat.com>
(cherry picked from commit
b8bbf642c1bc985e5e08639f44adc0e0d7c686da)
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')