Bug 98667

Summary: FTP installation fails from FTP servers with standard 150 response
Product: [Retired] Red Hat Linux Reporter: Adam Sampson <rhbugs>
Component: anacondaAssignee: Michael Fulbright <msf>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: tech-staff
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-11 15:39:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Sampson 2003-07-07 11:46:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4b) Gecko/20030517
Mozilla Firebird/0.6

Description of problem:
I work for the UK Mirror Service, one of Red Hat's primary FTP mirrors in the
UK. Last week, one of our users reported that they were unable to do an FTP
install of Red Hat Linux 9 from our FTP servers, and we've verified this ourselves.

The error messages we see from anaconda are:
readHeaders(): exception content-length getting content-length
File
ftp://ftp.lancs.mirror.ac.uk/sites/ftp.redhat.com/pub/redhat/linux/9/en/os/i
386/RedHat/base/hdlist not found.

Having looked at the anaconda source, this appears to be because our FTP servers
don't include the file size in their "150 About to open data connection"
response. Other FTP servers typically end that message with something like
"(123456 bytes)", indicating the size of the file; however, this behaviour is
not required (or even suggested) by the FTP RFCs, and Python's ftplib and urllib
(which anaconda uses) only provide the Content-Length information if the server
supplied it.

The specific bit of code that looks wrong is in urlinstall.py, after the "#
sanity check result" comment. This causes the file fetch to bomb out if the
server does not provide the length of the file in its 150 response. I think it
would be better to find an alternate way of checking whether the fetch succeeded
-- perhaps just by trying to read data and handling exceptions and empty
responses correctly.

We're currently working on making our FTP server's 150 response include the size
as well; currently we can recommend HTTP installs as a workaround, but it would
be nice if anaconda coped correctly with non-size-containing 150 responses in
the future.

Version-Release number of selected component (if applicable):
anaconda-9.0-4

How reproducible:
Always

Steps to Reproduce:
1. Try to do an FTP install of Red Hat Linux, using
ftp://ftp.mirror.ac.uk/sites/ftp.redhat.com/ as the mirror.
    

Actual Results:  The installation fails with the errors:
readHeaders(): exception content-length getting content-length
File
ftp://ftp.lancs.mirror.ac.uk/sites/ftp.redhat.com/pub/redhat/linux/9/en/os/i
386/RedHat/base/hdlist not found.


Expected Results:  The installation should complete successfully.

Additional info:

Comment 1 Michael Fulbright 2003-07-11 15:39:55 UTC
Try the update available in 

http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=87431

it has a fix for your problem as well.