From: Sage Weil Date: Thu, 25 Jul 2019 22:04:34 +0000 (-0500) Subject: mgr/telemetry: force re-opt-in if the report contents change X-Git-Tag: v15.1.0~1958^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=143e1f046909cb68d769ebbbaa80cb7106879997;p=ceph.git mgr/telemetry: force re-opt-in if the report contents change Signed-off-by: Sage Weil --- diff --git a/doc/rados/operations/health-checks.rst b/doc/rados/operations/health-checks.rst index e83cd479b666..e796ca70d764 100644 --- a/doc/rados/operations/health-checks.rst +++ b/doc/rados/operations/health-checks.rst @@ -897,3 +897,32 @@ The time period for what "recent" means is controlled by the option These warnings can be disabled entirely with:: ceph config set mgr/crash/warn_recent_interval 0 + +TELEMETRY_CHANGED +_________________ + +Telemetry has been enabled, but the contents of the telemetry report +have changed since that time, so telemetry reports will not be sent. + +The Ceph developers periodically revise the telemetry feature to +include new and useful information, or to remove information found to +be useless or sensitive. If any new information is included in the +report, Ceph will require the administrator to re-enable telemetry to +ensure they have an opportunity to (re)review what information will be +shared. + +To review the contents of the telemetry report,:: + + ceph telemetry show + +Note that the telemetry report consists of several optional channels +that may be independently enabled or disabled. For more information, see +:ref:`telemetry`. + +To re-enable telemetry (and make this warning go away),:: + + ceph telemetry on + +To disable telemetry (and make this warning go away),:: + + ceph telemetry off diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index aabb32cfb6ec..b01b3d576c10 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -445,6 +445,18 @@ class Module(MgrModule): self.run = False self.event.set() + def refresh_health_checks(self): + health_checks = {} + if self.enabled and self.last_opt_revision < LAST_REVISION_RE_OPT_IN: + health_checks['TELEMETRY_CHANGED'] = { + 'severity': 'warning', + 'summary': 'Telemetry requires re-opt-in', + 'detail': [ + 'telemetry report includes new information; must re-opt-in (or out)' + ] + } + self.set_health_checks(health_checks) + def serve(self): self.load() self.config_notify() @@ -454,6 +466,12 @@ class Module(MgrModule): self.event.wait(10) while self.run: + self.refresh_health_checks() + + if self.last_opt_revision < LAST_REVISION_RE_OPT_IN: + self.log.debug('Not sending report until user re-opts-in') + self.event.wait(1800) + continue if not self.enabled: self.log.debug('Not sending report until configured to do so') self.event.wait(1800)