Commit 9865179
committed
ci(apt): pin Azure mirror as primary via priority: annotations
`apt-transport-mirror` treats unannotated peer URLs in a mirrorlist as
equal, and spreads each `apt-get update` request across them for load
balancing. That combined with `mirror+file://` in bf848fa means one
`InRelease` can come from azure while the matching `Packages.gz` comes
from archive.ubuntu.com (or vice versa), and when the two hosts are
mid-sync apt fails with:
File has unexpected size (4263777 != 4263737). Mirror sync in progress?
Observed on an earlier PR run at step:15 line 881 — archive served an
`InRelease` that disagreed with the `Packages.gz` its mirror had just
rotated. `Acquire::Retries` doesn't help here because the bad file is
consistently returned until the mirror finishes its push.
Annotate the mirrorlist with `priority:` (lower = preferred) so every
request goes to azure first and archive is touched only when azure
fails. This eliminates the cross-host version-skew race entirely;
the only remaining case is a mid-push on azure alone, which is rare
and typically covered by `Acquire::Retries`.
Secondary benefit: on GHA runners (which live inside Azure's network)
azure.archive.ubuntu.com is an order of magnitude faster than the
public archive.ubuntu.com, so pinning azure as primary is also a
throughput win — "load balancing" over an unevenly fast pair was a
pessimization, not a speedup.
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>1 parent bf848fa commit 9865179
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments