From: Joe Buck Date: Wed, 24 Jul 2013 19:24:33 +0000 (-0700) Subject: teuth: fix issue in cleanup code X-Git-Tag: 1.1.0~2049 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4fb5781afbd40fa5267c99ad1d799acea6d6fa52;p=teuthology.git teuth: fix issue in cleanup code 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 Reviewed-by: Josh Durgin --- diff --git a/teuthology/task/rgw.py b/teuthology/task/rgw.py index 35f5c6363..b6921da67 100644 --- a/teuthology/task/rgw.py +++ b/teuthology/task/rgw.py @@ -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