[Yum] yum timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 16, 2003 at 11:06:53AM -0500, Troy Dawson wrote:
> Hi Seth,
> The question came up about timeouts with yum.
> 
> Here is the scenario, so that you know what I'm talking about.
> 
> A user set's up some type of firewall.  They make alot of holes in it, and 
> what have you, but for some reason they don't allow things to come in.  So 
> basically yum connects to the server and just sits there because for some 
> reason there isn't anything comming back.  Will yum eventually timeout?
> 
> I'm not exactly sure this is the problem, I'm still investigating, but it's 
> something I'm curious about anyway.

Yes, sorta.  It will definitely time out.  I do not remember off the
top of my head what kind of exception a timeout results in though,
which will affect how it's handled.  If someone beats me to this,
and it's not handled well (as in yum dumps a traceback) then let me
know and I'll add that into the current "excepts".

The problem is that timeouts are not handled well in python 2.2.  You
get whatever the default timeout is, and there's no way (unless you
do a lot of work) to adjust it.  There's a module out there (called
timeoutsocket.py, I think) that "fixes" this by _pushing_ socket
methods into the standard socket module.  I've used it before and
works nicely.  That could be used to sort-of impose timeouts on socket
connections.  With a single import and function call, you can set the
default timeout for all sockets.  You can also set timeouts
per-socket, but that's less useful here since you don't normally have
direct access to the sockets.

Bottom line: it's easy to make yum timeout nicely.  If you want it to
have settable timeouts, that's a little harder, but still not too bad.
Neither of these have been deliberately implemented or tested (that I
know of).

					-Michael
-- 
  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner@xxxxxxxxxxxx
  Box 90305, Durham N.C. 27708-0305


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux