Repository navigation
Retry a stalled apt download on the next mirror, not the same one - #84
Merged
Merged
Conversation
The first run of this pull request showed the retry doing nothing: all four attempts started cmake's 14 MB from azure.archive.ubuntu.com again and none got through it in 240 s. The runner's apt-mirrors.txt lists Azure first and archive.ubuntu.com second, but apt only moves down that list on an error, never on a mirror that is merely slow. From the second attempt on, Azure's line is taken out of the list. apt reads the list at the start of every download run - the log shows it as "Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist" - so no second apt-get update is needed for it to apply. timeout now runs under sudo, so that its signal reaches apt and not only the sudo in front of it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #83, which was merged before this commit reached it.
The first run of #83 showed the retry doing nothing. All four attempts started cmake's 14 MB from
azure.archive.ubuntu.comagain, and none got through in 240 s; the simulator job was cancelled at its timeout. The runner's/etc/apt/apt-mirrors.txtlists Azure first andarchive.ubuntu.comsecond, but apt only moves down that list on an error, never on a mirror that is merely slow.What changed
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist), so no secondapt-get updateis needed.timeoutnow runs undersudo, so its signal reaches apt itself and not only thesudoin front of it.Tested
The fallback can only be exercised while Azure is actually slow. A green run of this PR shows that the normal path still works and that the cache fills. It does not prove the fallback.