mgr/telemetry: add crashdump info to report

Signed-off-by: Dan Mick <dan.mick@redhat.com>
This commit is contained in:
Dan Mick 2018-08-24 20:56:29 -07:00
parent 4eb23af17c
commit 2c17bc98bf

View File

@ -204,6 +204,19 @@ class Module(MgrModule):
return metadata
def gather_crashinfo(self):
crashdict = dict()
errno, crashids, err = self.remote('crash', 'do_ls', '', '')
if errno:
return ''
for crashid in crashids.split():
cmd = {'id': crashid}
errno, crashinfo, err = self.remote('crash', 'do_info', cmd, '')
if errno:
continue
crashdict[crashid] = json.loads(crashinfo)
return crashdict
def compile_report(self):
report = {'leaderboard': False, 'report_version': 1}
@ -270,6 +283,8 @@ class Module(MgrModule):
for key, value in service_map['services'].items():
report['services'][key] += 1
report['crashes'] = self.gather_crashinfo()
return report
def send(self, report):