]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Move osd_scrub_pgs call to finally block of ceph main task.
authorWarren Usui <warren.usui@inktank.com>
Fri, 7 Feb 2014 22:54:23 +0000 (14:54 -0800)
committerWarren Usui <warren.usui@inktank.com>
Fri, 7 Feb 2014 22:54:23 +0000 (14:54 -0800)
Fixes: 7198
Signed-off-bye: Warren Usui <warren.usui@inktank.com>

teuthology/task/ceph.py

index 92db5269bcfe020255aca31e1b430c0725c7018e..4e42f4830d32ed5d5458f782d22e75524771e34e 100644 (file)
@@ -1181,8 +1181,6 @@ 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):
@@ -1437,5 +1435,8 @@ def task(ctx, config):
         lambda: run_daemon(ctx=ctx, config=config, type_='mds'),
         ):
         if config.get('wait-for-healthy', True):
-          healthy(ctx=ctx, config=None)
-        yield
+            healthy(ctx=ctx, config=None)
+        try:
+            yield
+        finally:
+            osd_scrub_pgs(ctx, config)