I am trying to remotely untar a file using fabric 0.92, but am receiving an EOF from paramiko.
def deployFile(self, localdir, remoteroot, filename):
log.info('Deploying file {0} to host {1}...'.format(filename, self.host))
env.password = self.password
env.disable_known_hosts = True
localFile=localdir+"/"+filename
remoteFile='/tmp/{0}'.format(filename)
with settings(host_string = self.connectstring):
log.info('...putting {0}'.format(filename))
put(localFile, "/tmp/", mode=0755)
with cd(remoteroot):
untar='tar zxvf {0}'.format(remoteFile)
log.info('...untarring {0}'.format(filename))
#paramiko.util.log_to_file('paramiko.out')
sudo(untar, pty=True)
My output from paramiko.out:
DEB [20110205-20:49:36.782] thr=1 paramiko.transport: [chan 8] Max packet in: 34816 bytes
DEB [20110205-20:49:36.784] thr=2 paramiko.transport: [chan 7] EOF received (7)
DEB [20110205-20:49:36.785] thr=2 paramiko.transport: [chan 8] Max packet out: 32768 bytes
INF [20110205-20:49:36.785] thr=2 paramiko.transport: Secsh channel 8 opened.
DEB [20110205-20:49:36.788] thr=2 paramiko.transport: EOF in transport thread
I am able to perform other sudo commands using fabric, but untarring a file seems to break.开发者_运维知识库 I have compared the md5sum of the local file and of the remote file, and they are equal. I am able to untar the file without errors when I log into the remote machine.
Is this still an issue in the new Fabric release for you? Also you might try dropping the verbose flag on the tar. Could perhaps be flooding the stdout/stdin pipes.
精彩评论