]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
workunit: Move cleanup to separate run
authorSam Lang <sam.lang@inktank.com>
Thu, 8 Nov 2012 14:55:36 +0000 (08:55 -0600)
committerSam Lang <sam.lang@inktank.com>
Thu, 8 Nov 2012 15:09:23 +0000 (09:09 -0600)
Removing the scratchdir in the remote run command
at the end of the script invocation will do the remove
once the first script finishes.  With possibly a shared
scratch dir across workunit clients, we want to wait to
remove the scratch dir once all the workunit scripts have
completed.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
teuthology/task/workunit.py

index 536f9bd906bd4b2eb7fbe01da71740501e2bcff6..05efa07ffc95993ecaa8cd104b0649004bb0f930 100644 (file)
@@ -216,13 +216,15 @@ def _run_tests(ctx, refspec, role, tests, env, subdir):
                             srcdir=srcdir,
                             workunit=workunit,
                             ),
-                        run.Raw('&&'),
-                        'rm', '-rf', '--', scratch_tmp,
                         ])
                 remote.run(
                     logger=log.getChild(role),
                     args=args,
                     )
+                remote.run(
+                    logger=log.getChild(role),
+                    args=['rm', '-rf', '--', scratch_tmp],
+                    )
     finally:
          log.info('Stopping %s on %s...', spec, role)
         remote.run(