[paramiko] Paramiko connection does not react well to sync

Matthews, James jmatthews at Railpower.com
Tue Jul 24 08:59:25 PDT 2007


Greetings,

            I have been furiously testing a Python (v2.4.3) application
built on wx.Python (v) that uses paramiko (v1.7) for an SSH connection
to essentially a "bare-bones" Linux box running dropbear (v0.49).  The
setup was working great except for one annoying bug that kept popping up
in different locations.  Namely, it appears to happen in very random
places during a very long process in which the application connects to
the Linux box, moves a few files around, updates the image on the box,
and then mounts two particular partitions to restore some files (namely
for convenience so I don't have to do it manually after the image
update).  Now the problem appeared after somebody else went in and added
some lines of code which they thought would make this process more
reliable.  I don't know if this is exactly what was causing the problem,
but after weeks of debugging, tracing, and cursing I found what I
believe the problem to be.  Apparently, they had added a function to
open a new session to execute a Linux command on the box, which just so
happened to be the 'sync' command.  They had put this in after every
time I mounted a partition in order to access it, and their comments
said something along the lines of, "#Make sure the File System is
aware", or "#Give the File System time before accessing the file".  It
seems that around this command in the code, the 10 second connection
check would sense a downed connection.

            I'm sorry for the length of this email, but basically my
question is... Is it even necessary to perform a 'sync' operation after
just a simple partition mount?  And further more, would it make any
sense for this to cause paramiko to close the Transport unexpectedly?

 

James L. Matthews, III

Computer Engineering Intern

Railpower Hybrid Technologies

2021 Peninsula Dr.

Erie, PA 16506

814-835-2212 ext. 236

Cell: 623-570-4509

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.lag.net/pipermail/paramiko/attachments/20070724/77b66e79/attachment.htm 


More information about the paramiko mailing list