Wait for network before downloading ssh credentials or user-data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on EC2 |
Invalid
|
Medium
|
Unassigned | ||
Hardy |
Invalid
|
Undecided
|
Unassigned | ||
Intrepid |
Invalid
|
Undecided
|
Unassigned | ||
Jaunty |
Invalid
|
Undecided
|
Unassigned | ||
VMBuilder |
Invalid
|
Undecided
|
Unassigned | ||
ec2-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Hardy |
Fix Released
|
Critical
|
Scott Moser | ||
Intrepid |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
When an instance boots quickly on Amazon EC2 the init code can occasionally try to use the network before the network is working.
This may not happen on most boots, but it is definitely worth adding in some code to check for the network before attempting to do critical tasks like:
- download ssh public key
- download user-data
Here is a sample of the script I use to download ssh credentials on the existing Ubuntu EC2 images:
http://
Note the code like the following which waits until the network is working before it continues:
perl -MIO::Socket::INET -e 'until(new IO::Socket:
Until this check was added, people experienced random failures where an AMI would boot ok, but they were unable to ssh in because the ssh credentials download had failed.
Many non-Ubuntu AMIs do not experience this problem because they boot so slowly :)
Changed in vmbuilder: | |
status: | New → Invalid |
Changed in ubuntu-on-ec2: | |
importance: | Undecided → Medium |
milestone: | none → beta3 |
status: | New → In Progress |
description: | updated |
Changed in ec2-init (Ubuntu): | |
status: | New → Confirmed |
Changed in ec2-init (Ubuntu): | |
status: | Confirmed → Fix Released |
tags: | added: ec2-images uec-images |
Changed in ubuntu-on-ec2: | |
status: | Fix Released → Invalid |
Changed in ec2-init (Ubuntu Hardy): | |
importance: | Undecided → Critical |
Changed in ec2-init (Ubuntu Intrepid): | |
importance: | Undecided → Medium |
Changed in ec2-init (Ubuntu Intrepid): | |
status: | New → Won't Fix |
After a fair amount of testing, I have not experienced this problem on the current official Ubuntu beta AMI for Intrepid. This might be because Intrepid starts more slowly than the Hardy AMI I build (2min vs 40sec). It's possible that if an official Hardy AMI were released it would experience this problem. It's also possible that as more people use the Ubuntu kernel these AMIs will boot faster, so I still recommend tossing in the fix.