mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
tasks/dump_stuck: more verbose
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
7625ebd8a2
commit
50f2022412
@ -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_)
|
||||
|
Loading…
Reference in New Issue
Block a user