Skip to content

Commit

Permalink
Merge pull request #7 from mlausch/master
Browse files Browse the repository at this point in the history
fix gathering of unhealty OSDs
  • Loading branch information
Crapworks committed Jan 2, 2015
2 parents 62069af + 8aeaf1d commit e2a5f6a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ceph-dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,18 @@ def get_unhealthy_osd_details(osd_status):

for obj in osd_status['nodes']:
if obj['type'] == 'osd':
#if OSD does not exists (DNE in osd tree) skip this entry
if obj['exists'] == 0: continue
if obj['status'] == 'down' or obj['status'] == 'out':
unhealthy_osds.append({
#It is possible to have one host in more than one branch in the tree.
#Add each unhealthy OSD only once in the list
entry = {
'name': obj['name'],
'status': obj['status'],
'host': find_host_for_osd(obj['id'], osd_status)
})
}
if entry not in unhealthy_osds:
unhealthy_osds.append(entry)

return unhealthy_osds

Expand Down

0 comments on commit e2a5f6a

Please sign in to comment.