From: Warren Usui Date: Fri, 31 Jan 2014 23:29:02 +0000 (-0800) Subject: Scrub osds when ceph task finishes X-Git-Tag: 1.1.0~1674^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e8717163a67a1273dd9b18abc91cfd74f38ae38d;p=teuthology.git Scrub osds when ceph task finishes Fixes: 7198 Signed-off-by: Warren Usui --- diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 4bd2b59e8..ac705ccb9 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -1023,6 +1023,23 @@ def cluster(ctx, config): ), ) +def osd_scrub_pgs(ctx, config): + """ + Scrub pgs when we exit. + """ + + for remotes in ctx.cluster.remotes: + site_info = remotes.values() + for st_info in site_info: + for role in st_info: + if role.startswith('osd.'): + log.info("Scrubbing osd {osd}".format(osd=role)) + testdir = teuthology.get_testdir(ctx) + remotes.run(args=[ + 'adjust-ulimits', + 'ceph-coverage', + '{tdir}/archive/coverage'.format(tdir=testdir), + 'ceph', 'osd', 'scrub', role]) @contextlib.contextmanager def run_daemon(ctx, config, type_): @@ -1103,6 +1120,8 @@ def run_daemon(ctx, config, type_): try: yield finally: + if type_ == 'osd': + osd_scrub_pgs(ctx, config) teuthology.stop_daemons_of_type(ctx, type_) def healthy(ctx, config):