]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Use the configured username for _make_scratch_dir
authorJoe Buck <joe.buck@inktank.com>
Thu, 25 Oct 2012 00:33:25 +0000 (17:33 -0700)
committerJoe Buck <joe.buck@inktank.com>
Fri, 26 Oct 2012 00:42:32 +0000 (17:42 -0700)
teuthology/task/workunit.py

index 9ec81c6a8bd0711a979e0cce34cbcdbffa32fc10..06ff6664b8821dafaf4dcfffe0a3e983f6bc751a 100644 (file)
@@ -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_),
             ],