]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: force re-opt-in if the report contents change
authorSage Weil <sage@redhat.com>
Thu, 25 Jul 2019 22:04:34 +0000 (17:04 -0500)
committerSage Weil <sage@redhat.com>
Thu, 1 Aug 2019 01:33:19 +0000 (20:33 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
doc/rados/operations/health-checks.rst
src/pybind/mgr/telemetry/module.py

index e83cd479b6669bf82ab4f1f56ee31e302a7a2d9a..e796ca70d764dbc17d8096282816a8d74f505d2f 100644 (file)
@@ -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
index aabb32cfb6eca47b440a6937066a308d8b9c93e0..b01b3d576c101a25c19111bd0baaa47399fd0ad9 100644 (file)
@@ -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)