mirror of
https://github.com/ceph/ceph
synced 2025-01-19 09:32:00 +00:00
ceph_manager: count 'incomplete' as 'down'
This commit is contained in:
parent
0d6ce42405
commit
731d520900
@ -266,12 +266,22 @@ class CephManager:
|
||||
num += 1
|
||||
return num
|
||||
|
||||
def get_num_down(self):
|
||||
pgs = self.get_pg_stats()
|
||||
num = 0
|
||||
for pg in pgs:
|
||||
if (pg['state'].count('down') and not pg['state'].count('stale')) or \
|
||||
(pg['state'].count('incomplete') and not pg['state'].count('stale')):
|
||||
num += 1
|
||||
return num
|
||||
|
||||
def get_num_active_down(self):
|
||||
pgs = self.get_pg_stats()
|
||||
num = 0
|
||||
for pg in pgs:
|
||||
if (pg['state'].count('active') and not pg['state'].count('stale')) or \
|
||||
(pg['state'].count('down') and not pg['state'].count('stale')):
|
||||
(pg['state'].count('down') and not pg['state'].count('stale')) or \
|
||||
(pg['state'].count('incomplete') and not pg['state'].count('stale')):
|
||||
num += 1
|
||||
return num
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user