Bug 328822

Summary: Libzypp should retry download after timeout
Product: [openSUSE] openSUSE 10.3 Reporter: Stefan Nordhausen <nordhaus>
Component: libzyppAssignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Stanislav Visnovsky <visnov>
Severity: Normal    
Priority: P5 - None CC: bluedzins, dmacvicar, lslezak
Version: RC 1   
Target Milestone: ---   
Hardware: i686   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 328870    

Description Stefan Nordhausen 2007-09-27 08:18:28 UTC
When zypper downloads a file via internet and a timeout occurs it just quits instead of trying again. This is very annoying if you want to download a lot of files (e.g. during update from RC1->RC1+factory).

Zypper should automatically retry a least once! If the probability for a timeout is 1% and you are downloading 1000 packages, never retrying will give you 10 timeouts on average that require human intervention. By automatically retrying just one time this can be reduced to 0.1 timeouts on average (=every 10th user sees a timeout). If you retry 2 times it gets down to 1 timeout per 1000 users.


Similarly, upon timeout Yast always shows a dialog which asks you if you want to retry. This is useless if you are trying to install something _without_ human supervision, e.g. over night online installation: Yast will wait forever instead of just retrying.
Why not make this a dialog that will count down automatically and then retry downloading unless "Cancel" is pressed? We already have this kind of dialog when a reboot is required during installation.


Should I open a seperate bug report for Yast? Or do you want to keep both issues in the same bug for better coordination? After all, both are very related.
Comment 1 Jan Kupec 2008-03-18 15:17:56 UTC
Josef will take care of this. Josef please check with Lada whether to handle this in libzypp directly or only in the applications. Pass on to Lada in the latter case once you're finished with zypper.
Comment 2 Ladislav Slezák 2008-03-18 15:33:41 UTC
It should be handled on the application level (yast/zypper) because the application can display e.g. a popup with count down and return RETRY.
Comment 3 Josef Reidinger 2008-03-21 11:47:44 UTC
done for zypper and reassign to Lada

Lada: use new IO_SOFT error for handling this situation (mediaRequestCallback)

Stefan: thanks for useful report, for zypper is default three attempt to retry (of course after thirty seconds waiting for user)
Comment 4 Ladislav Slezák 2008-03-21 16:59:12 UTC
Implemented in yast2-packager-2.16.26 and in yast2-pkg-bindings-2.16.20.
(There are also 3 attempts (30 secs each) in yast.)
Comment 5 Ladislav Slezák 2008-03-21 17:19:26 UTC
*** Bug 332175 has been marked as a duplicate of this bug. ***
Comment 6 Peter Poeml 2008-03-28 12:19:12 UTC
In case you aren't aware of it, here is a proposal for libzypp how to
handle failures gracefully, and falling back to other download sources
in case of an error: http://en.opensuse.org/Libzypp/Failover 
This helps much more than simple retrying.
Comment 7 Jan Kupec 2008-03-28 12:41:08 UTC
Yes, we discussed that some time ago. Is there a fate request for this?
Comment 8 Peter Poeml 2008-03-28 14:18:26 UTC
328822 and 300644 come close, or are at least related.