import logging
+import re
import time
import ceph_manager
stale = manager.get_stuck_pgs('stale', timeout)
assert len(stale) == num_stale
+ # check health output as well
+ health = manager.raw_cluster_cmd('health')
+ log.debug('ceph health is: %s', health)
+ if num_inactive > 0:
+ m = re.search('(\d+) pgs stuck inactive', health)
+ assert int(m.group(1)) == num_inactive
+ if num_unclean > 0:
+ m = re.search('(\d+) pgs stuck unclean', health)
+ assert int(m.group(1)) == num_unclean
+ if num_stale > 0:
+ m = re.search('(\d+) pgs stuck stale', health)
+ assert int(m.group(1)) == num_stale
+
def task(ctx, config):
"""
Test the dump_stuck command.
logger=log.getChild('ceph_manager'),
)
+ manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats')
+ manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats')
manager.wait_for_clean(timeout)
+
check_stuck(
manager,
num_inactive=0,