]> git.apps.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)
committerJoao Eduardo Luis <joao@suse.com>
Mon, 9 Dec 2019 19:36:54 +0000 (19:36 +0000)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 143e1f046909cb68d769ebbbaa80cb7106879997)

 Conflicts:
doc/rados/operations/health-checks.rst
            We don't have the crash module, hence neither its docs.
src/pybind/mgr/telemetry/module.py
            Issues due to context

doc/rados/operations/health-checks.rst
src/pybind/mgr/telemetry/module.py

index aa4ba460f73f1a570da6cd06d032bf9200eafc84..2eb4623beb1ba36a364e4a51bcfd6f06399c8406 100644 (file)
@@ -584,3 +584,36 @@ happen if they are misplaced or degraded (see *PG_AVAILABILITY* and
 You can manually initiate a scrub of a clean PG with::
 
   ceph pg deep-scrub <pgid>
+
+
+Miscellaneous
+-------------
+
+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 5497ba785b33662054d191a262d914e694747156..d68974a01bac65c61967f294a0b3385abe3f2c0e 100644 (file)
@@ -416,6 +416,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.init_module_config()
         self.run = True
@@ -424,6 +436,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.config['enabled']:
                 self.log.debug('Not sending report until configured to do so')
                 self.event.wait(1800)