Red Hat Bugzilla – Bug 505424
Unable to retrieve kickstart from password-protected FTP server
Last modified: 2010-03-30 04:02:20 EDT
Created attachment 347471 [details]
Parse login/password from url
Description of problem:
In RHEL 5.3 (anaconda-126.96.36.199) the installer fails to retrieve a kickstart file hosted on password-protected FTP with syntax:
with error message:
16:52:09 ERROR : failed to retrieve
Strangely enough, the code to parse the login and password was present in RHEL 4 (anaconda-10.1.1.99) and is also present in F12. The attached patch is a backport from HEAD of the relevant parts to parse login and password from ks= parameter.
Version-Release number of selected component (if applicable):
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
It's worth noting that for RHEL6, once we have anaconda-13.0 or later in the tree, we will need to retest this to verify that it's still fixed in light of my libcurlization patch.
I touched the code in Fedora recently, so I may as well backport the feature to rhel too.
Fix should appear in anaconda 188.8.131.52.
This fails with anaconda 184.108.40.206.
INFO: transfering ftp://atodorov:email@example.com/ks.cfg to a fd
ERROR: cannot determine address family of atodorov
ERROR: failed to retrieve http://atodorov:firstname.lastname@example.org/ks.cfg
Can you give me the log files too please? I'm interested in DEBUG messages.
Created attachment 378471 [details]
tar.gz archive of /tmp in stage2
The logs this time look a bit different than from comment #7. I've canceled the ks.cfg download and went to stage2 to collect all the logs under /tmp
Created attachment 383694 [details]
tar.gz archive of /tmp in stage2
This is with anaconda-220.127.116.11-1 -0114.nightly.
Tested on virtual machine where anaconda boot command line has ks=ftp://atodorov:redhat@server/ks.cfg.
loader prompted for ks.cfg location as it was not able to download the file. trying with wget and the same ftp url works just fine.
/var/log/xferlog looks like:
Thu Jan 14 15:10:15 2010 1 10.36.11.189 372 /home/atodorov/ks.cfg b _ o r atodorov ftp 0 * c
Thu Jan 14 15:11:00 2010 1 10.16.71.182 0 /ks.cfg b _ o r atodorov ftp 0 * i
Thu Jan 14 15:11:03 2010 1 10.16.71.182 0 /ks.cfg b _ o r atodorov ftp 0 * i
1st line is with wget from my desktop and 2nd and 3rd lines are from anaconda.
moving back to assigned.
Well this doesn't seem to be related to ftp login bug. It seems that we logged in successfully and we asked for /ks.cfg exactly as you requested in the url. Your ftp server apparently returned nothing...
So this might be a new bug, because your wget used different path than anacondas ftp client. Is there any reason for it?
I don't know why the request path differs. Adding jskala to CC as he seems to be vsftpd maintainer.
can you take a look at comment #12 and comment #14 and tell us why the same url request appears as 2 different paths on the server?
Alex: can you retest using /home/atodorov/ks.cfg as the path in anaconda? We may at least figure out if the login&download code works and concentrate only on the path issue if it does.
I've tested vsftpd on RHEL5 with wget and ftp. Xferlog contains the same paths in both cases. What about sync with mounting time of /home or something similar.
Send more info about your tests (conf, versions etc.) ...
(In reply to comment #16)
> Alex: can you retest using /home/atodorov/ks.cfg as the path in anaconda? We
> may at least figure out if the login&download code works and concentrate only
> on the path issue if it does.
when ks=ftp://atodorov:email@example.com/home/atodorov/ks.cfg then anaconda is able to pull down the ks.cfg file and proceed to stage2 automatically. It's probably a path issue.
(In reply to comment #17)
> Send more info about your tests (conf, versions etc.) ...
I'm using vsftpd on RHEL5.5 with it's default configuration. What I do before starting anaconda is this:
1) yum -y install vsftpd
2) service vsftpd start
3) useradd atodorov
4) passwd atodorov
5) chmod a+r /home/atodorov
6) create /home/atodorov/ks.cfg
(In reply to comment #18)
> (In reply to comment #16)
> when ks=ftp://atodorov:firstname.lastname@example.org/home/atodorov/ks.cfg then anaconda
> is able to pull down the ks.cfg file and proceed to stage2 automatically. It's
> probably a path issue.
Alex, this seems verified then. If you have issues with path, I recommend to file a new bug. Move this to VERIFIED, please.
I've tried password ftp for the method= URL with RHEL5.4. It also needs the user to specify the full path to the tree, including the user home directory.
I'll move this to VERIFIED because the same behavior is present in 5.4 and because comment #18 successfully retrieved the ks.cfg file when specified by full path
please advise what should be the default behavior wrt file path. When opening the non-anonymous URL with Firefox it automatically displays the contents of the user's home directory. It is also able to download files without specifying the absolute path on disk but only the relative path (relative to $HOME).
If anaconda needs the absolute path this should be documented.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.