ceph / ceph-medic

find common issues in ceph clusters
MIT License
22 stars 18 forks source link

KeyError " unhandled error: check_cluster_fsid" #63

Closed alfredodeza closed 7 years ago

alfredodeza commented 7 years ago

When ceph.conf doesn't exist, the check should handle this error and eat it up. The lack of a ceph.conf is already handled by a different check.

[2017-09-20 09:20:23,016][ceph_medic.runner][ERROR ] check had an unhandled error: check_cluster_fsid
Traceback (most recent call last):
  File "/Users/alfredo/python/ceph-medic/ceph_medic/runner.py", line 55, in run_host
    result = getattr(module, check)(host, data)
  File "/Users/alfredo/python/ceph-medic/ceph_medic/checks/common.py", line 67, in check_cluster_fsid
    host_fsid = get_fsid(metadata[daemon][hostname])
  File "/Users/alfredo/python/ceph-medic/ceph_medic/checks/common.py", line 14, in get_fsid
    contents = data['paths']['/etc/ceph']['files'][cluster_path]['contents']
KeyError: '/etc/ceph/ceph.conf'
andrewschoen commented 7 years ago

Fixed by #68