Trusty: apt does not try next mirror if index file download fails with mirror:// source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Fix Released
|
Medium
|
Louis Bouchard |
Bug Description
[SRU justification]
This fix is needed to allow correct archive mirroring functionality.
[Impact]
Without this fix, apt-get update and other apt commands requiring Package file access may fail when there are remote transient errors due to archive availability.
[Fix]
Use std::npos instead of 0 to test presence of "Translation" in ShortDesc.
[Test Case]
1) Setup three containers (archive1, archive2, archive3) with a reprepro configuration mirroring the ubuntu restricted archive (to save on space and time to replicate).
2) Add an apache webserver serving the reprepro archive over http on each container
3) Add the following mirrors.txt file to one of the webserver (archive1):
$ cat /var/www/
http://
http://
http://
4) Add a client container. Add the IP adresses of the archive[1-3] containers to /etc/hosts. Alias the archive1 address to archive.ubuntu.com similar to the following :
$ cat /etc/hosts
127.0.0.1 localhost
10.0.4.182 archive1 mirrors.ubuntu.com
10.0.4.127 archive2
10.0.4.193 archive3
5) Add the following line to the /etc/apt/
$ cat /etc/apt/
#deb http://
#deb http://
#deb http://
#deb http://
deb mirror:
6) Run
$ apt-get -oDebug:
The log should display for the Packages file :
MirrorMethod:
Failure to get http://
Err http://
With the fix you will see :
MirrorMethod:
Failure to get http://
TryNextMirror: http://
[Regression]
None expected. Worse that can happen is a retry when none was done previously.
[Original description of the problem]
When using the mirror:
Running the following on Trusty leads to the following result :
sudo apt-get update -qq
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
W: Failed to fetch mirror:
E: Some index files failed to download. They have been ignored, or old ones used instead.
The same configuration works correctly on Xenial
description: | updated |
no longer affects: | apt (Ubuntu Xenial) |
Changed in apt (Ubuntu): | |
status: | Invalid → Fix Released |
importance: | Undecided → Medium |
tags: |
added: verification-done removed: verification-needed |
Marking dev + xenial as Invalid since it works from Xenial onward