Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 549487

Summary: FTP installation fails due to REST FTP command requires block mode (MODE B) enabled
Product: Red Hat Enterprise Linux 5 Reporter: Rafael Godínez Pérez <rgodinez>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: medium    
Version: 5.4CC: bhinson, brueckner, pasik, tcallawa
Target Milestone: rc   
Target Release: 5.5   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-21 04:37:25 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:
Attachments:
Description Flags
anaconda log none

Description Rafael Godínez Pérez 2009-12-21 19:52:52 UTC
Created attachment 379699 [details]
anaconda log

Description of problem:
RHEL 5.4 installation on z/VM 5.4 using z/OS UNIX Services FTP server fails just when downloading the first package.
Logs and traffic sniffing show that failure occurs due to FTP server complaining REST command used by anaconda to get the package requires block or compressed mode, not stream mode.



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


How reproducible:
Always

Steps to Reproduce:
1. download and extract RHEL 5.4 DVD .iso content
2. transfer to FTP server path
3. start FTP installation with --method=ftp://server/path
4. accept method dialog FTP parameters when it appears (log shows URL converted to ftp://server//path)
5. stage2.img is downloaded correctly
6. first package is not downloaded. anaconda.log shows URL mangled to ftp://user:enc_passwd@server/%2F/path , and 10 attempts to download .rpm file, then it fails.
 
Actual results:
Installation stops with error, giving chance to change parameter and retry, or abort.

Expected results:
Packages are downloaded, installed and eventually installation is happily concluded.

Additional info:
Attached anaconda.log, and an extract of a 50MB Wireshark capture.

Relevant parts of log files 

** anaconda.log
* URL is built
13:23:03 INFO    : starting to STEP_URL

13:23:03 INFO    : URL_STAGE_MAIN - url is ftp://smvrains/SYSTEM/productos/LINUX/RHEL5/DVD

13:23:03 DEBUG   : url address smvrains

13:23:03 DEBUG   : url prefix /SYSTEM/productos/LINUX/RHEL5/DVD

* stage2.img is correctly downloaded and mounted
13:23:31 INFO    : transferring ftp://smvrains//SYSTEM/productos/LINUX/RHEL5/DVD/images/stage2.img to a fd

13:23:40 DEBUG   : copied 88608768 bytes to /tmp/ramfs/stage2.img (complete)

13:23:40 INFO    : mntloop loop0 on /mnt/runtime as /tmp/ramfs/stage2.img fd is 10


* shortly after, URL is mangled, and method defined
13:23:40 INFO    : got url ftp://cessi12:%6c%75%6e%61%30%39%31%30@smvrains//SYSTEM/productos/LINUX/RHEL5/DVD
(...)
13:23:45 INFO    : Method = ftp://cessi12:%6c%75%6e%61%30%39%31%30@smvrains//SYSTEM/productos/LINUX/RHEL5/DVD


* packages will start to be installed
14:26:58 INFO    : moving (1) to step installpackages

14:26:58 INFO    : Preparing to install packages

14:26:58 DEBUG   : Member: system-config-services.noarch 0-0.9.4-1.el5 - u

* first package cannot be downloaded
14:27:05 WARNING : Try 10/10 for ftp://cessi12:%6c%75%6e%61%30%39%31%30@smvrains/%2F/SYSTEM/productos/LINUX/RHEL5/DVD/Server/system-config-services-0.9.4-1.el5.noarch.rpm failed

14:27:05 WARNING : Failed to get ftp://cessi12:%6c%75%6e%61%30%39%31%30@smvrains/%2F/SYSTEM/productos/LINUX/RHEL5/DVD/Server/system-config-services-0.9.4-1.el5.noarch.rpm from mirror 1/1

And here Anaconda shows an error message, giving choice to retry, or abort.


** Wireshark traffic sniffing
* It shows first file transfers correctly done:
127   2.657528    10.63.4.1   10.63.105.10      FTP   Response: 125 Sending data set /SYSTEM/productos/LINUX/RHEL5/DVD/images/stage2.img
127   2.657528    10.63.4.1   10.63.105.10      FTP   Response: 125 Sending data set /SYSTEM/productos/LINUX/RHEL5/DVD/images/stage2.img
53024 118.873436  10.63.4.1   10.63.105.10      FTP   Response: 125 Sending data set /SYSTEM/productos/LINUX/RHEL5/DVD/Server/repodata/repomd.xml
53091 119.483509  10.63.4.1   10.63.105.10      FTP   Response: 125 Sending data set /SYSTEM/productos/LINUX/RHEL5/DVD/Server/repodata/primary.xml.gz
54426 124.023535  10.63.4.1   10.63.105.10      FTP   Response: 125 Sending data set /SYSTEM/productos/LINUX/RHEL5/DVD/Server/repodata/comps-rhel5-server-core.xml
55813 142.103370  10.63.4.1   10.63.105.10      FTP   Response: 125 Sending data set /SYSTEM/productos/LINUX/RHEL5/DVD/Server/repodata/filelists.xml.gz

** Then first package downloading fails
* The package can be accessed, and listed
59062 188.218661  10.63.105.10      10.63.4.1   FTP   Request: NLST system-config-services-0.9.4-1.el5.noarch.rpm

59063 188.238613  10.63.4.1   10.63.105.10      FTP   Response: 125 List started OK

59064 188.238905  10.63.4.1   10.63.105.10      FTP-DATA    FTP Data: 47 bytes

59070 188.273768  10.63.4.1   10.63.105.10      FTP   Response: 250 List completed successfully.

* FTP binary and passive options are set

59072 188.274083  10.63.105.10      10.63.4.1   FTP   Request: TYPE I

59073 188.274576  10.63.4.1   10.63.105.10      FTP   Response: 200 Representation type is Image

59074 188.274858  10.63.105.10      10.63.4.1   FTP   Request: PASV

59075 188.275906  10.63.4.1   10.63.105.10      FTP   Response: 227 Entering Passive Mode (10,63,4,1,62,142)

* Anaconda tries to download file using REST, and it fails due to Stream mode.
59079 188.277124  10.63.105.10      10.63.4.1   FTP   Request: REST 440

59080 188.277774  10.63.4.1   10.63.105.10      FTP   Response: 504 Restart requires Block or Compressed transfer mode.

After 10 attempts, it stops.

** RFC for FTP
This works with other FTP servers, but z/OS UNIX Services FTP server (and possibly others) doesn't support REST operations over Stream mode (MODE S).
Current RFC for FTP protocol "recommends" support for REST over Stream mode, but it is not mandatory, so we may well find other FTP servers where the RHEL installation fails.
http://www.faqs.org/rfcs/rfc959.html

Related bugs: #530900

Comment 1 Rafael Godínez Pérez 2009-12-21 19:55:34 UTC
I suppose this applies to every architecture and is not specific to s390x.

Comment 2 Chris Lumens 2009-12-22 20:46:01 UTC
You're past the loader, which means anaconda's luckily not to blame for this kind of package download problem.  anaconda uses yum, which in turn uses urlgrabber.  It may in turn use something more lower level, but reassigning to them for now.  I'm not sure where the division of responsibility is there.

Comment 3 James Antill 2010-01-11 19:33:32 UTC
This is david's problem now, although we'll have likely fixed it for RHEL-6 due to moving urlgrabber from python to curl.

Comment 9 Pasi Karkkainen 2010-12-06 13:41:40 UTC
I'm seeing ftp:// installation problems on x86 and x86_64 with RHEL 5.5. 
The installation hangs at "Starting install process.  This may take several minutes..." stage and it never starts. ftp-server in question is running pureftpd.

I think it's the same curl bug that was affecting Fedora 13 and Fedora 14, and was fixed recently:

curl bug:
https://bugzilla.redhat.com/show_bug.cgi?id=643656

original fedora anaconda ftp:// bug:
https://bugzilla.redhat.com/show_bug.cgi?id=624431

Comment 10 RHEL Program Management 2013-03-21 04:37:25 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.