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.
I'm thinking right now to replace get_mirror_ from_availabili ty_zone with:
| def get_mirror_ from_availabili ty_zone( self, availability_zone): s.ec2.archive. ubuntu. com" % availability_ zone[:- 1] getaddrinfo( host, None, 0, socket.SOCK_STREAM) archive. ubuntu. com/ubuntu/ '
| # availability is like 'us-west-1b' or 'eu-west-1a'
| try:
| host="%
| socket.
| return host
| except:
| return 'http://
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.