I'm thinking right now to replace get_mirror_from_availability_zone
with:
| def get_mirror_from_availability_zone(self, availability_zone):
| # availability is like 'us-west-1b' or 'eu-west-1a'
| try:
| host="%s.ec2.archive.ubuntu.com" % availability_zone[:-1]
| socket.getaddrinfo(host, None, 0, socket.SOCK_STREAM)
| return host
| except:
| return 'http://archive.ubuntu.com/ubuntu/'
Over all, it takes a much better "hit" to select a ec2 mirror. That
should greatly reduce the chance for false positives.
The chance for error is then:
a.) availability zone names change form (ie, no longer '<region>[a-z]')
b.) there are images in a new region before a mirror is up, but the
dns entry already exists
I think its reasonably good, the only thing that concerns me is the
possibility of getaddrinfo hanging.
--
ec2-init selects us-east-1 mirror when running in us-west-1 region
https://bugs.launchpad.net/bugs/494185
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs