tasks/dump_stuck: more verbose

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-10-05 11:33:37 -04:00
parent 7625ebd8a2
commit 50f2022412

View File

@ -24,10 +24,15 @@ def check_stuck(manager, num_inactive, num_unclean, num_stale, timeout=10):
:param timeout: timeout value for get_stuck_pgs calls
"""
inactive = manager.get_stuck_pgs('inactive', timeout)
assert len(inactive) == num_inactive
unclean = manager.get_stuck_pgs('unclean', timeout)
assert len(unclean) == num_unclean
stale = manager.get_stuck_pgs('stale', timeout)
log.info('hi mom')
log.info('inactive %s / %d, unclean %s / %d, stale %s / %d',
len(inactive), num_inactive,
len(unclean), num_unclean,
len(stale), num_stale)
assert len(inactive) == num_inactive
assert len(unclean) == num_unclean
assert len(stale) == num_stale
# check health output as well
@ -105,10 +110,12 @@ def task(ctx, config):
num_stale=0,
)
log.info('stopping both osds')
for id_ in teuthology.all_roles_of_type(ctx.cluster, 'osd'):
manager.kill_osd(id_)
manager.mark_down_osd(id_)
log.info('waiting for all to be stale')
starttime = time.time()
done = False
while not done:
@ -125,6 +132,7 @@ def task(ctx, config):
if time.time() - starttime > 900:
raise
log.info('reviving')
for id_ in teuthology.all_roles_of_type(ctx.cluster, 'osd'):
manager.revive_osd(id_)
manager.mark_in_osd(id_)