Merge autopkgtest-cloud:use-us-archive into autopkgtest-cloud:master

Proposed by Brian Murray
Status: Merged
Merged at revision: 5ec6d7649e7f42da0d5b8ff38e5b932b6c5a2212
Proposed branch: autopkgtest-cloud:use-us-archive
Merge into: autopkgtest-cloud:master
Diff against target: 16 lines (+6/-0)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image (+6/-0)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Paride Legovini Pending
Review via email: mp+438808@code.launchpad.net

Description of the change

The link to ftpmaster.internal is very slow from both bos01 and bos02 (RT 156412) so let's work around it by using us.archive.ubuntu.com.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

I'm pretty sure this will work.

Revision history for this message
Steve Langasek (vorlon) wrote :

Is it better to push this in image creation time or via cloud-init?

Revision history for this message
Brian Murray (brian-murray) wrote :

AFAIK we only use a cloud-init user data file for the armhf images.

Revision history for this message
Steve Langasek (vorlon) :
review: Approve
Revision history for this message
Brian Murray (brian-murray) wrote :

For the record I should have actually tested this before submitting an MP because this is ****. I've cowboy'ed something that actually works in production. I'm gonna blame it on still having vacation brain.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
2index 68b8665..640a843 100755
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
5@@ -14,6 +14,12 @@ fi
6 [ -z "${MIRROR:-}" ] && . ~/mirror.rc
7 export MIRROR
8
9+if [ -z "${MIRROR:-}" ]; then
10+ if [ "${REGION}" == "bos01" ] || [ "${REGION}" == "bos02" ]; then
11+ MIRROR=http://us.archive.ubuntu.com/ubuntu/
12+ fi
13+fi
14+
15 [ -z "${NET_NAME:-}" ] && . ~/net-name.rc
16 export NET_NAME
17

Subscribers

People subscribed via source and target branches