[Bug 714807] Re: install of cloud-init without eth0 will cause boot hang
Clint Byrum
clint at fewbar.com
Mon Feb 7 21:05:19 UTC 2011
Sounds to me like you need an alternative event to run on instead of
net-device-up IFACE=eth0 when there's no network.
Scott, per our verbal discussion:
Change cloud-init to have this start on:
start on mounted MOUNTPOINT=/ and ((net-device-up IFACE!=lo) or started
cloud-init-no-net)
then add this job
# cloud-init-no-net
start on mounted MOUNTPOINT=/
stop net-device-up IFACE!=lo
task
console output
script
sleep 5
echo $UPSTART_JOB "waiting for a network device."
sleep 25
echo $UPSTART_JOB "gave up waiting for a network device."
end script
# EOF
This job will only be "started" after the 30 seconds passes (tasks aren't started until they exit 0). It will be stopped and killed if net-device-up IFACE!=lo happens.
The 5 second sleep is for normal situations.. we don't need to print
anything on the console in that case. But a user may be confused if we
don't do that after 5 seconds.
This does mean that if the network takes over 30 seconds to come up
cloud-init will be run without the network.
Some other things could be done to make the timeout more dynamic and
help users to avoid making their system take a 30 second nap waiting to
boot.. for instance if the cloud type is local files, just exit
immediately.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in ubuntu.
https://bugs.launchpad.net/bugs/714807
Title:
install of cloud-init without eth0 will cause boot hang
More information about the Ubuntu-server-bugs
mailing list