From 53ff33a7f03588ca552c783e57c3ba8c56f7c7b6 Mon Sep 17 00:00:00 2001 From: Joe Buck Date: Wed, 24 Oct 2012 17:33:25 -0700 Subject: [PATCH] Use the configured username for _make_scratch_dir --- teuthology/task/workunit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teuthology/task/workunit.py b/teuthology/task/workunit.py index 9ec81c6a8bd07..06ff6664b8821 100644 --- a/teuthology/task/workunit.py +++ b/teuthology/task/workunit.py @@ -94,6 +94,7 @@ def _make_scratch_dir(ctx, role): id_ = role[len(PREFIX):] log.debug("getting remote for {id} role {role_}".format(id=id_, role_=role)) (remote,) = ctx.cluster.only(role).remotes.iterkeys() + dir_owner = remote.shortname.split('@', 1)[0] mnt = os.path.join('/tmp/cephtest', 'mnt.{id}'.format(id=id_)) remote.run( args=[ @@ -108,7 +109,7 @@ def _make_scratch_dir(ctx, role): 'install', '-d', '-m', '0755', - '--owner={user}'.format(user='ubuntu'), #TODO + '--owner={user}'.format(user=dir_owner), '--', 'client.{id}'.format(id=id_), ], -- 2.39.5