mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
mgr/telemetry: add crashdump info to report
Signed-off-by: Dan Mick <dan.mick@redhat.com>
This commit is contained in:
parent
4eb23af17c
commit
2c17bc98bf
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user