eth0 not mapped by hotplug

Bug #19641 reported by Martin Meredith
24
Affects Status Importance Assigned to Milestone
hotplug (Ubuntu)
Fix Released
Critical
Scott James Remnant (Canonical)

Bug Description

This morning, I did a dist-upgrade on breezy to find that my network was no
longer being auto-started, which was very confusing for a while.

I checked out /etc/network/interface and saw that the following should be
mapping eth0

mapping hotplug
        script grep
        map eth0

However, this was not the case, and I had to add eth0 to the "auto" section of
the interfaces file.

This was very confusing, and I thought something was broken with the kernel...

Also, on boot, i recieve the following error when hotplug starts:

Warning: Interface is eth0 at line 2, cannot be mapped reliably.

Revision history for this message
Colin Watson (cjwatson) wrote :

I see this too, although unfortunately I don't have time to fix it. The problem
seems to be that (a) the module now appears in the initramfs, so eth0 is brought
up then, but the initramfs doesn't have hotplug (fair enough); (b) it used to be
possible to coldplug network interfaces later on, but there's no longer an
/etc/hotplug/net.rc so this doesn't happen, and the net event for eth0 is never
received outside the initramfs. Normally net.ifup would run when the hotplug
event is first received and then wait until the hotplug-net init script is run,
but this doesn't work in an initramfs situation.

There's discussion of this in Debian bugs #296640 and #303671, at least. Jeff,
could you please look at this fairly urgently? It breaks network-enabled
installations, because base-config expects to be able to download language packs
from the network and then suddenly finds that it can't.

Revision history for this message
Matt Zimmerman (mdz) wrote :

It sounds like what we should do is to add a net.rc which, at boot time, looks
for existing interfaces and runs ifup <interface>=hotplug on them.

Does this sound correct to you folks?

Revision history for this message
Thomas Hood (jdthood) wrote :

I hope that Marco d'Itri will comment on this.(In reply to comment #2)
> It sounds like what we should do is to add a net.rc which, at boot time, looks
> for existing interfaces and runs ifup <interface>=hotplug on them.
>
> Does this sound correct to you folks?

That sounds feasible, but I would certainly like to hear what Marco d'Itri
thinks about the problem.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

For now, I think that a net.rc is the right solution. This avoids users having
to be aware of what's going on, and just means that things work for them.

In the long-term, it seems the wind is blowing towards getting ifupdown to deal
with hotplug events itself (perhaps as a udev hook), which will solve the
problem in a cleaner way but leaving the same user-effect (stuff just works).

Uploaded ubuntu6 which adds a net.rc that will cold-plug any network devices
around before S40networking.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Format: 1.7
Date: Mon, 15 Aug 2005 19:09:57 +0100
Source: hotplug
Binary: hotplug hotplug-udeb
Architecture: source
Version: 0.0.20040329-22ubuntu6
Distribution: breezy
Urgency: low
Maintainer: Fumitoshi UKAI <email address hidden>
Changed-By: Scott James Remnant <email address hidden>
Description:
 hotplug - Linux Hotplug Scripts
 hotplug-udeb - Linux Hotplug Scripts
Changes:
 hotplug (0.0.20040329-22ubuntu6) breezy; urgency=low
 .
   * Add a new /etc/hotplug/net.rc that cold-plugs any network devices
     that have already been installed.
   * Run net.rc during normal startup (in S40hotplug), the actual ifup parts
     will wait until after S41hotplug-net have been run. This saves some
     code duplication and isn't that less efficient.
   * Don't remove net.rc during upgrades.
Files:
 2f7d35833e57125d5b257879e65e267f 693 admin standard
hotplug_0.0.20040329-22ubuntu6.dsc
 7572e2be23caefe5bbcf2ad1c8b2778e 56011 admin standard
hotplug_0.0.20040329-22ubuntu6.diff.gz
package-type: udeb

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

*** Bug 19618 has been marked as a duplicate of this bug. ***

Revision history for this message
Thomas Hood (jdthood) wrote :

Marco d'Itri writes at http://blog.bofh.it/id_99

I have just uploaded a preliminary (and totally untested) version of my new
coldplugging scripts (and of the hotplug-related udev rules).

The plan is to generate at boot time a set of synthesized hotplug events which
are as similar as possible as the ones which would be captured in the initramfs
by udeveventrecorder.

The implementation is an init script which will run the /etc/hotplug/*.rc shell
scripts. Each one which will synthesize the events and dump them to files in
/dev/.events/. Then the init script will use udevinitsend to feed the events to
udevd, which will use a few RUN rules to load the relevant modules or user space
scripts, asynchronously.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.