Set up a mirror based on zone
Bug #317065 reported by
Soren Hansen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on EC2 |
Fix Released
|
Undecided
|
Chuck Short | ||
ec2-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: ec2-init
It's likely that there will be a mirror in each of Amazon's avalability zones. We should detect which zone we're in and automatically use the right mirror.
Suggested implementation:
ec2-init installs a symlink: /etc/apt/
We'll put a template sources.list in /etc/ec2/
The init script will detect the zone in which we're running, and generate /var/run/
Related branches
Changed in ubuntu-on-ec2: | |
assignee: | nobody → zulcss |
Changed in ubuntu-on-ec2: | |
status: | Triaged → Fix Released |
To post a comment you must log in.
There is currently no standard, reliable method for determining what specific availability zone an EC2 instance is running in.
In fact, availability zone us-east-1a for one EC2 account may not be the same availability zone as us-east-1a for another EC2 account. Amazon assigns these names randomly for each account (but keeps them consistent within that account).
There are no public, shared, external names for the EC2 availability zones. They are all relative to the specific account running the instance.
I believe the best an instance can do is to determine what region it is running in and use a mirror name which represents the mirror instance(s) in that region.
When architecting the mirrors, there should still be at least one instance running in each availability zone to provide the level of reliability that EC2 users depend on.
When the instance determines the region it is in (say, us-east-1) it could use something like: east-1. archive. canonical. com 1.ec2.archive. canonical. com
ec2-us-
or
us-east-
and that could resolve to the internal IP addresses for the mirrors in all the availability zones in that region.
There is a chance that the user's instance might not get the mirror in its own availability zone which would add a small network transfer charge (currently $0.01/GB) but this is still much less than accessing a mirror completely outside of EC2 (about $0.10/GB).