]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: include any config options that are customized
authorSage Weil <sage@redhat.com>
Thu, 25 Jul 2019 21:22:55 +0000 (16:22 -0500)
committerSage Weil <sage@redhat.com>
Wed, 6 Nov 2019 12:41:50 +0000 (06:41 -0600)
This does not reveal the value of the options, only which options have
been customized.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit fce9fe87df8d9a00c5da905009589d6514e4013c)

doc/mgr/telemetry.rst
src/pybind/mgr/telemetry/module.py

index 36f13d42457a45e95998ca98a4c469dde180b665..9621a4a62c3ae5b64b81c752935cb25709753c3b 100644 (file)
@@ -21,6 +21,8 @@ the per-channel setting has no effect.)
     - number of monitors, managers, OSDs, MDSs, radosgws, or other daemons
     - software version currently being used
     - number and types of RADOS pools and CephFS file systems
+    - names of configuration options that have been changed from their
+      default (but *not* their values)
 
 * **crash** (default: on): Information about daemon crashes, including
 
index 7144cb4c6d80bdaffed29d44ab92a8cddf7d9add..724864d914e9c9bf2ea3e90054adecc92953a764 100644 (file)
@@ -84,7 +84,7 @@ class Module(MgrModule):
             'name': 'channel_basic',
             'type': 'bool',
             'default': True,
-            'description': 'Share basic cluster information (size, version)',
+            'desc': 'Share basic cluster information (size, version)',
         },
         {
             'name': 'channel_ident',
@@ -202,6 +202,26 @@ class Module(MgrModule):
 
         return metadata
 
+    def gather_configs(self):
+        configs = set()
+        r, outb, outs = self.mon_command({
+            'prefix': 'config dump',
+            'format': 'json'
+        });
+        if r != 0:
+            return {}
+        try:
+            dump = json.loads(outb)
+        except json.decoder.JSONDecodeError:
+            return {}
+        for opt in dump:
+            name = opt.get('name')
+            if name:
+                configs.add(name)
+        return {
+            'non_default_options': [ sorted(list(configs)) ]
+        }
+
     def gather_crashinfo(self):
         crashlist = list()
         errno, crashids, err = self.remote('crash', 'do_ls', '', '')
@@ -266,6 +286,8 @@ class Module(MgrModule):
                 'features': mon_map['features']
             }
 
+            report['config'] = self.gather_configs()
+
             num_pg = 0
             report['pools'] = list()
             for pool in osd_map['pools']: