]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: move contact info to an 'ident' channel
authorSage Weil <sage@redhat.com>
Thu, 25 Jul 2019 15:46:55 +0000 (10:46 -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 35c273c9c3ebd00fbac8e1a9fd281333a24c5fe7)

Conflicts:
src/pybind/mgr/telemetry/module.py
          Due to lack of 'crash' and 'devicehealth' modules, and a bit
          on how we keep options (self.config[] vs class attributes)

src/pybind/mgr/telemetry/module.py

index 35cf6a603fae917705f081220ff59b4dccb8f68c..5df9c6dc909790ed485b898d49b40a9783e2acd1 100644 (file)
@@ -16,7 +16,7 @@ from collections import defaultdict
 
 from mgr_module import MgrModule
 
-ALL_CHANNELS = ['basic']
+ALL_CHANNELS = ['basic', 'ident']
 
 class Module(MgrModule):
     config = dict()
@@ -71,6 +71,12 @@ class Module(MgrModule):
             'default': True,
             'description': 'Share basic cluster information (size, version)',
         },
+        {
+            'name': 'channel_ident',
+            'type': 'bool',
+            'default': False,
+            'description': 'Share a user-provided description and/or contact email for the cluster',
+        }
     ]
 
     COMMANDS = [
@@ -241,11 +247,11 @@ class Module(MgrModule):
             'channels_available': ALL_CHANNELS,
         }
 
-        if self.str_to_bool(self.config['leaderboard']):
-            report['leaderboard'] = True
-
-        for option in ['description', 'contact', 'organization']:
-            report[option] = self.config.get(option, None)
+        if 'ident' in channels:
+            if self.config['leaderboard']:
+                report['leaderboard'] = True
+            for option in ['description', 'contact', 'organization']:
+                report[option] = self.config.get(option, None)
 
         if 'basic' in channels:
             mon_map = self.get('mon_map')