Bug 765598

Summary: Kickstart netinstall gives up instantly if download times-out
Product: Red Hat Enterprise Linux 6 Reporter: Floris <bos>
Component: python-urlgrabberAssignee: James Antill <james.antill>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: zpavlas
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-10 10:19:45 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
log vt none

Description Floris 2011-12-08 22:20:59 UTC
Description of problem:

The installer is supposed to try to download a package 10 times before giving up, but in reality it displays an error box on first failure.


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

Centos 6.1


How reproducible:

Always

Steps to Reproduce:

1. Do a kickstart installation over the network
2. Use a slow mirror, or -like in my case- a proxy server that doesn't start sending the file to the client until it received everything from the origin.
3. Wait 30 seconds for the download to time-out.
  
Actual results:

"the file blabla.rpm cannot be openend. This is due to a missing file, a corrupt package or corrupt media" popup for every large package. 

Expected results:

The log window says try (1/10), so I would expect it not to give up until it tried 10 times, instead of prompting the user after 30 seconds.

Comment 1 Floris 2011-12-08 22:22:00 UTC
Created attachment 544205 [details]
log vt

Comment 3 David Cantrell 2011-12-15 20:30:53 UTC
I doubt there's anything that can be done.  Based on your screenshot, your connection is close to unusable (less than 1 byte per second).  Reassigning for completeness.  Package installation in anaconda is handled by yum, and downloading is handled by the urlgrabber module.

Comment 4 Floris 2011-12-21 14:37:02 UTC
<<
your connection is close to unusable (less than 1 byte per second).
>>

No, the connection itself is fine.


However it is using a proxy server that waits until the entire file has been downloaded from the Internet completely, before passing the file to the client.

That's why it says less than 1 byte per second.
The proxy has not finished downloading the file from the Internet, so it has not started sending the file to the final destination either.


Such proxy servers are more common then you might think.
E.g. the ones that include decent virus scanning features, will need to download the entire file first to scan it, even though Yum only requests a small partial byte range of the file at the stage the error occurs.

Comment 6 Suzanne Logcher 2012-02-14 23:23:32 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 7 Zdeněk Pavlas 2013-04-09 15:58:49 UTC
This issue is also present upstream, and not resolved yet.  See http://lists.baseurl.org/pipermail/yum-devel/2012-June/009345.html 

Strictly speaking, it's NOT a urlgrabber bug.  When a request fails, urlgrabber issues a failure_callback.  The callback may return (in this case a retry is made), or re-raise the error (this skips remaining retries).

When retrieving .rpm files, Yum always re-raises the error, skipping all retries.  That's because using next mirror is almost always better than re-trying the same URL 10 times.  Since by default each mirror is removed after failure and there's only 1 mirror, Yum makes 1 request only.  The failover mechanism could be changed, but that should be done in Yum.

Comment 8 Zdeněk Pavlas 2013-04-10 10:19:45 UTC
I think this feature has to be implemented upstream first, and tuned on user input.  If the lack of retries is a major problem in kickstarter, it can override the failure callback at any time with something like:

def err_and_retry(errobj):
  print '%s: %s' % (errobj.url, errobj.exception)
  ..

yb.repos.setFailureCallback(err_and_retry)