From: Zack Cerza Date: Fri, 9 May 2014 17:07:55 +0000 (-0500) Subject: Use Remote.user X-Git-Tag: 1.1.0~1466 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a58174d7522672d9ba0105023f2405910123bb08;p=teuthology.git Use Remote.user Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index 9d832effe3..bde222dd33 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -35,7 +35,7 @@ class Remote(object): def __init__(self, name, ssh=None, shortname=None, console=None, host_key=None, keep_alive=True): self.name = name - (self.user, self.hostname) = name.split('@')[-1] + (self.user, self.hostname) = name.split('@') self._shortname = shortname self.host_key = host_key self.keep_alive = keep_alive diff --git a/teuthology/task/workunit.py b/teuthology/task/workunit.py index b504eeb50c..1c88337230 100644 --- a/teuthology/task/workunit.py +++ b/teuthology/task/workunit.py @@ -170,7 +170,7 @@ def _make_scratch_dir(ctx, role, subdir): 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] + dir_owner = remote.user mnt = os.path.join(teuthology.get_testdir(ctx), 'mnt.{id}'.format(id=id_)) # if neither kclient nor ceph-fuse are required for a workunit, # mnt may not exist. Stat and create the directory if it doesn't.