GCP Ubuntu repositories | One returns a 404
Laurent Dumont
laurentfdumont at gmail.com
Thu Sep 8 22:50:24 UTC 2022
Hey folks,
We had a weird case where a 22.04 VM spun up in GCP was configured with a
non-working APT repo. This is after cloud-init configures APT based on the
metadata returned.
laurentdumont at ubuntu-test:~$ grep -ir "northamerica-northeast2"
/var/log/cloud-init.log
2022-09-08 22:38:33,858 - util.py[DEBUG]: search for mirror in candidates:
'['http://northamerica-northeast2.gce.archive.ubuntu.com/ubuntu/', '
http://northamerica-northeast2-a.gce.clouds.archive.ubuntu.com/ubuntu/', '
http://gce.clouds.archive.ubuntu.com/ubuntu/']'
2022-09-08 22:38:33,972 - util.py[DEBUG]: Resolving URL:
http://northamerica-northeast2.gce.archive.ubuntu.com/ubuntu/ took 0.114
seconds
2022-09-08 22:38:33,974 - util.py[DEBUG]: Resolving URL:
http://northamerica-northeast2-a.gce.clouds.archive.ubuntu.com/ubuntu/ took
0.002 seconds
2022-09-08 22:38:33,975 - util.py[DEBUG]: found working mirror: '
http://northamerica-northeast2-a.gce.clouds.archive.ubuntu.com/ubuntu/'
It's a set of three URLs
- northamerica-northeast2.gce.archive.ubuntu.com = Does not resolve
- northamerica-northeast2-a.gce.clouds.archive.ubuntu.com = Resolves OK
- gce.clouds.archive.ubuntu.com = Resolves OK
I can't reproduce it, but we had that instance come up with
northamerica-northeast2.gce.archive.ubuntu.com which APT did not like.
The weird part is that GCP does have the northamerica-northeast1 region
which does have all three APT URLs working.
ping northamerica-northeast1.gce.archive.ubuntu.com
PING us-east1.gce.archive.ubuntu.com (35.196.65.164) 56(84) bytes of data.
So all in all :
- I am not 100% clear on where the three mirrors are magically from. I
assume it's the metadata answer when cloud-init uses the GCP datasource.
- As far as I can see, the two regions should have the same working set
of APT repositories (even if the Canadian regions points to us-east1)
- Not sure if this is the best list for these types of questions but
it's a start!
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20220908/41be18c6/attachment.html>
More information about the ubuntu-users
mailing list