[Yum] yum and firewalls again

Troy Dawson dawson at fnal.gov
Wed Apr 30 17:55:16 UTC 2003


Hi Mike and Seth,
With the latest 1.0 daily that has urlgrabber, we've been able to do 
some tests.
So on the machine behind the firewall we get

  python urlgrabber.py ftp://server.com/path/to/file local_copy
    <hangs>
  pythons2 urlgrabber.py ftp://server.com/path/to/file local_copy
    <suceeds>

So we thought recompiling yum with python2 would work, and yes, the 
urlgrabber works, but the rest of yum can't talk to rpm-python

# yum list nedit
Traceback (most recent call last):
  File "/usr/sbin/yum", line 22, in ?
    import yummain
  File "yummain.py", line 21, in ?
  File "clientStuff.py", line 22, in ?
ImportError: No module named rpm
#

So, is there a way to have just one componet to use python2, or a 
variable to set somewhere that would make the rest of yum work right?  
I'm not asking for you to rewrite yum, I guess I'm more asking for 
general python help.

Thanks
Troy

Michael Stenner wrote:

>On Wed, Apr 23, 2003 at 09:45:07AM -0500, Troy Dawson wrote:
>  
>
>>seth vidal wrote:
>>    
>>
>>>>Well, I just tried ftp from my home machine which is behind an
>>>>iptables-based nat-int firewall.  I KNOW active FTP isn't going to
>>>>work from there.  From this I conclude that urllib2 uses passive ftp
>>>>(as I suspected).  It leaves me at a loss as to what the problem could
>>>>be with yum/urlgrabber/urllib2.
>>>>
>>>>As I said, I'd be willing to pursue this if you think it's a problem
>>>>on "our end".  I recommend you start with these two things:
>>>>
>>>>1) use some other ftp client from that machine to grab the same file
>>>>
>>>>2) use urlgrabber directly to grab it, as in
>>>>
>>>> python2 urlgrabber.py ftp://server.com/path/to/file local_copy
>>>>
>>>>See what happens with those.
>>>>        
>>>>
>>>I bet he's using 1.0 - which doesn't have urlgrabber, yet, and doesn't
>>>have urllib2 at all :)
>>>      
>>>
>>Doh ... I forgot to say that.  Yes, this is a 1.0 yum.  I've got to look, this 
>>might even be a 0.9x yum.
>>    
>>
>
>Eeek.  OK.  Then I recommend you work around it for now.  If you want
>to see how it _will_ behave when urlgrabber gets into the 1.0 series,
>just grab urlgrabber from a 2.0 release and do waht I described
>above.  Make sure you run python1.5, though.  It will be exactly the
>same file.  It's written to work for 1.5 and 2.x (although with some
>added capabilities for 2.x).
>
>If it works, then it will probably work in a soon-to-come 1.x series
>release.  If it doesn't work, then that's interesting and we should
>fix it.  (this is all assuming that it's a yum issue in the first
>place).
>
>				-Michael
>
>  
>





More information about the Yum mailing list