]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/telemetry: Ignore crashes in report when module not enabled 30846/head
authorWido den Hollander <wido@42on.com>
Wed, 2 Oct 2019 07:37:49 +0000 (09:37 +0200)
committerWido den Hollander <wido@42on.com>
Thu, 10 Oct 2019 15:11:59 +0000 (17:11 +0200)
commit2139ef7a4814251088f3142d18b637ca5f22ac05
tree1ae8a284ec41e072037ef0edd6bbd0634d2ee336
parente12e8ee6e831276b43eb7be9a04b7076ad0a9890
mgr/telemetry: Ignore crashes in report when module not enabled

The crash module is not guaranteerd to be enabled and this will render
the telemetry module useless:

  Error EINVAL: Traceback (most recent call last):
    File "/usr/lib/ceph/mgr/telemetry/module.py", line 325, in handle_command
      report = self.compile_report()
    File "/usr/lib/ceph/mgr/telemetry/module.py", line 291, in compile_report
      report['crashes'] = self.gather_crashinfo()
    File "/usr/lib/ceph/mgr/telemetry/module.py", line 214, in gather_crashinfo
      errno, crashids, err = self.remote('crash', 'do_ls', '', '')
    File "/usr/lib/ceph/mgr/mgr_module.py", line 845, in remote
      args, kwargs)
  ImportError: Module not found

We can safely ignore this error and just continue without the crash information.

Fixes: https://tracker.ceph.com/issues/42116
Signed-off-by: Wido den Hollander <wido@42on.com>
src/pybind/mgr/telemetry/module.py