]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: change crash dict to a list
authorDan Mick <dan.mick@redhat.com>
Wed, 17 Apr 2019 04:02:11 +0000 (21:02 -0700)
committerSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 22:10:11 +0000 (17:10 -0500)
For ease of indexing.  There's no value in timestamp keys.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
(cherry picked from commit 1efb98df792d6cbfaea12fc293a5718bfed18c94)

src/pybind/mgr/telemetry/module.py

index 034cc4031eeb79181ca9bebc31cb82ae293b2a06..19d21872b5653f6fceb62790dda45b73d3308886 100644 (file)
@@ -171,7 +171,7 @@ class Module(MgrModule):
         return metadata
 
     def gather_crashinfo(self):
-        crashdict = dict()
+        crashlist = list()
         errno, crashids, err = self.remote('crash', 'do_ls', '', '')
         if errno:
             return ''
@@ -180,8 +180,8 @@ class Module(MgrModule):
             errno, crashinfo, err = self.remote('crash', 'do_info', cmd, '')
             if errno:
                 continue
-            crashdict[crashid] = json.loads(crashinfo)
-        return crashdict
+            crashlist.append(json.loads(crashinfo))
+        return crashlist
 
     def compile_report(self):
         report = {