]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
teuthology: cleanup client dirs for workunit task
authorJoe Buck <jbbuck@gmail.com>
Fri, 22 Mar 2013 18:56:50 +0000 (11:56 -0700)
committerJoe Buck <jbbuck@gmail.com>
Fri, 22 Mar 2013 20:02:32 +0000 (13:02 -0700)
This patch corrects an issue where a workunit task is
not cleaning up generated directories
if the 'all' key is used to specify clients.

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

index 339c46e64f44e19b002960f4e0f8c44869d99d09..d7f4aca04d5396ac951a5363c8cf23e69ea79da4 100644 (file)
@@ -212,6 +212,11 @@ def _spawn_on_all_clients(ctx, refspec, tests, env, subdir):
             for remote, role in client_remotes:
                 p.spawn(_run_tests, ctx, refspec, role, [unit], env, subdir)
 
+    # cleanup the generated client directories
+    client_generator = teuthology.all_roles_of_type(ctx.cluster, 'client')
+    for client in client_generator:
+        _delete_dir(ctx, 'client.{id}'.format(id=client), subdir)
+
 def _run_tests(ctx, refspec, role, tests, env, subdir=None):
     testdir = teuthology.get_testdir(ctx)
     assert isinstance(role, basestring)