Skip to content

Commit

Permalink
mgr/telemetry: reset health warning after re-opting-in
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
yaarith authored and Mark Nelson committed Jul 22, 2022
1 parent d9f4d18 commit cfcb0dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pybind/mgr/telemetry/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,9 @@ def on(self, license: Optional[str] = None) -> Tuple[int, str, str]:
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')
Expand Down

0 comments on commit cfcb0dc

Please sign in to comment.