From 780ebcdf1bcada7f5b0e211a637b76c3488f61bd Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Tue, 9 Aug 2011 16:11:32 -0700 Subject: [PATCH] Make sure workunit task does not create mnt.N by itself. This used to hide a bug in the rbd task, where rbd created the mountpoint with the wrong name. The workunits ended up running against the local filesystem. --- teuthology/task/workunit.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/teuthology/task/workunit.py b/teuthology/task/workunit.py index add2af032bfde..10fc6003870f6 100644 --- a/teuthology/task/workunit.py +++ b/teuthology/task/workunit.py @@ -30,16 +30,22 @@ def task(ctx, config): id_ = role[len(PREFIX):] (remote,) = ctx.cluster.only(role).remotes.iterkeys() mnt = os.path.join('/tmp/cephtest', 'mnt.{id}'.format(id=id_)) - scratch = os.path.join(mnt, 'client.{id}'.format(id=id_)) remote.run( args=[ + # cd first so this will fail if the mount point does + # not exist; pure install -d will silently do the + # wrong thing + 'cd', + '--', + mnt, + run.Raw('&&'), 'sudo', 'install', '-d', '-m', '0755', '--owner={user}'.format(user='ubuntu'), #TODO '--', - scratch, + 'client.{id}'.format(id=id_), ], ) -- 2.39.5