hang in failsafe.conf on precise

Evan Huus eapache at gmail.com
Tue Apr 24 13:47:02 UTC 2012


On Tue, Apr 24, 2012 at 6:39 AM, Christoph Mathys <eraserix at gmail.com>wrote:

> I just encountered some problems with very long boottimes on precise.
> failsafe.conf just hangs until the timeout has elapsed.
>
> The culprit seems to be that I define interfaces in
> /etc/network/interfaces that do not exist when I'm testing in kvm
> (ifup -a fails). This then seems to prevent static-network-up to be
> emitted. I'm not quite sure why this event is never emitted. Is
> static-network-up only emitted, if the job networking ("exec ifup -a")
> runs successfully? (I've disable network-interface.conf)
>

The static-network-up event is emitted by ifup using the
/etc/network/if-up.d/upstart script, and I believe it's only emitted when
all the 'auto' interfaces in /etc/network/interfaces are successfully
brought up (upstart is more my area than networking). The event is
necessary for boot to proceed safely, so if it doesn't happen, nothing past
that point will run until the failsafe kicks in after 120 seconds (which is
what you're seeing).


> As a workaround I think I'll just disable failsafe.conf and write my
> own job which immediately emits the static-network-up event.


You don't have to disable failsafe.conf. As long as something emits
static-network-up in a reasonable amount of time it won't cause any
problems, and it's useful to have active in other cases.

Writing another job that immediately emits the static-network-up event is
problematic in that it may be run before any network interfaces have
actually been brought up. This will cause all sorts of trouble for jobs
that start expecting to find active interfaces but then can't.

I believe the correct thing to do in this case is to remove the offending
entries from /etc/network/interfaces, since they're apparently unnecessary
in this particular environment. If there's some reason you'd rather not,
try sending an email to the upstart-devel [1] mailing list. Someone there
might know a better workaround.

Cheers,
Evan

[1] https://lists.ubuntu.com/mailman/listinfo/upstart-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20120424/e06eed3b/attachment.html>


More information about the Ubuntu-devel-discuss mailing list