From: Zack Cerza Date: Wed, 18 May 2016 15:32:47 +0000 (-0600) Subject: Remote._sftp_get_file(): Log file size X-Git-Tag: 1.1.0~612^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8de590e5f9ff27e5f955d26c5857ce330482c36b;p=teuthology.git Remote._sftp_get_file(): Log file size This is so that jobs transferring large files don't get mistaken for being hung. Fixes: http://tracker.ceph.com/issues/15427 Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index 2d7b6fe8d7..cb9d6b4691 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -264,6 +264,10 @@ class Remote(object): """ Use the paramiko.SFTPClient to get a file. Returns the local filename. """ + file_size = self._format_size( + self._sftp_get_size(remote_path) + ).strip() + log.debug("{}:{} is {}".format(self.shortname, remote_path, file_size)) sftp = self.ssh.open_sftp() sftp.get(remote_path, local_path) return local_path