From: Joe Buck Date: Thu, 25 Oct 2012 00:33:25 +0000 (-0700) Subject: Use the configured username for _make_scratch_dir X-Git-Tag: 1.1.0~2429^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F4%2Fhead;p=teuthology.git Use the configured username for _make_scratch_dir --- diff --git a/teuthology/task/workunit.py b/teuthology/task/workunit.py index 9ec81c6a8..06ff6664b 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_), ],