]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
teuth: fix issue in cleanup code
authorJoe Buck <jbbuck@gmail.com>
Wed, 24 Jul 2013 19:24:33 +0000 (12:24 -0700)
committerJoe Buck <jbbuck@gmail.com>
Wed, 24 Jul 2013 20:00:10 +0000 (13:00 -0700)
The post-yield code in create_dirs needed to
be tweaked to correctly delete the {tdir}/apache
directory (if it exists) on each client.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
teuthology/task/rgw.py

index 35f5c63635a7d15b046ef6ac6865d94062eee897..b6921da67be65e717bdf9f3b1831b8361dac9518 100644 (file)
@@ -49,11 +49,18 @@ def create_dirs(ctx, config):
                                                            client=client),
                     ],
                 )
-        ctx.cluster.only(client).run(
-            'rmdir',
-            '{tdir}/apache.{client}'.format(tdir=testdir,
-                                            client=client),
-            )
+
+        for client in config.iterkeys():
+            ctx.cluster.only(client).run(
+                args=[
+                    'test', '-d', 
+                    '{tdir}/apache'.format(tdir=testdir),
+                    run.Raw('&&'), 
+                    'rmdir',
+                    '{tdir}/apache'.format(tdir=testdir),
+                    run.Raw(';'), 
+                    ],
+                )
 
 
 @contextlib.contextmanager