[Bug 431255] [NEW] ec2-init: Move ec2-run-user-data to startup priority S99

Eric Hammond ehammond at thinksome.com
Thu Sep 17 08:36:34 UTC 2009


Public bug reported:

Binary package hint: ec2-init

AMI: ami-a40fefcd canonical-alphas-us/karmic-i386-alpha5.1.manifest.xml

All of the ec2-init functionality is currently driven by a single
/etc/init.d/ec2-init script which is run at a single rc startup level
(S15).

Some of the functionality, like regenerating ssh host keys and setting
up authorized_keys, are great to be done before sshd is started.

On the other hand, running the user-data script, should be close to the
last thing in the startup process, perhaps S99 (though I've been running
it at S71 in my AMIs).

In any case, the user-data script must not be run before sshd is
started.  When the user-data script takes a long time or gets into an
infinite loop, this prevents sshd from running, which prevents the user
from being able to ssh in and figure out what went wrong with the
startup script.

I ran into this already with a user-data script which waits until an EBS
volume is attached (a common boot up function), but the volume was never
attached and I couldn't ssh in to the instance to figure out what was
going wrong.

Note that the same existing logic should be used to only run the user-
data on the first boot of each instance (including rebundled images).

** Affects: ec2-init (Ubuntu)
     Importance: Undecided
         Status: Confirmed


** Tags: ec2-images

** Changed in: ec2-init (Ubuntu)
       Status: New => Confirmed

-- 
ec2-init: Move ec2-run-user-data to startup priority S99
https://bugs.launchpad.net/bugs/431255
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list