network-manager selects interface without cable attached

Bug #134496 reported by Jordi Mallach
2
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

I just installed Ubuntu server 7.10 tribe5, and used the integrated skge ethernet controller (second on the list in debian-installer) to do the network part of the install.

After the post-install reboot, my /etc/network/interfaces had a auto/dhcp setup for eth0 (pci realtek card), while the kernel had detected the integrated skge as eth1.

These are the available controllers:
02:09.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)
02:0d.0 Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (rev 13)

This is what the kernel says at boot:

[ 20.054945] eth0: RealTek RTL8139 at 0xf88a6c00, 00:17:9a:39:0c:bc, IRQ 20
[ 20.054947] eth0: Identified 8139 chip type 'RTL-8100B/8139D'
[ 20.055151] skge eth1: addr 00:17:31:7a:70:93

Shouldn't the installer have setup the same card I used to install the system?

Tags: iso-testing
Revision history for this message
to be removed (liw) wrote :

I have the same problem. In my case, the installer offered the extra D-Link card as the second option in its list (don't know if the ordering is relevant), and the installed system wanted to use the VIA card integrated onto the motherboard. The VIA card doesn' t have a cable attached, since it worked unreliably when I upgraded my home LAN to gigabit. I didn't bother to disable the integrated card in BIOS, to be able to easily swap between it and the D-Link card when testing.

Explicitly choosing the D-Link card in the NetworkManager applet made things work.

(This was with the 20070925.1 gutsy-alternate-i386.iso I'm testing today.)

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Looks like NM is picking the wrong card on boot. Please read https://wiki.ubuntu.com/DebuggingNetworkManager and attach appropriate logs.

Revision history for this message
to be removed (liw) wrote :

I followed the instructions on that page, and the syslog snippet is attached. I am not sure this is directly useful: after I manually chose the D-Link card, it seems to be chosen every time, even after a reboot. (Might be a timing problem, or udev randomness, rather than NM remembering the manual choice, though, for all I know.)

The snippet contains the entire syslog from the moment I did modprobe on the network card's driver.

Revision history for this message
to be removed (liw) wrote :

I rebooted a few more times, to get more statistics, and NetworkManager does not always choose the same device: sometimes it chooses one, sometimes the other Ethernet card.

Revision history for this message
Alexander Sack (asac) wrote :

Lars, I don't understand the problem here. Given that NetworkManager is independent of ifupdown, how should NM know which interface you initially want to be upped?

Revision history for this message
to be removed (liw) wrote :

Wearing a "ignorant user" hat: the installer asks me which interface should be used, but the installed system ignores that. I have to choose the right card from the NetworkManager every time, and that's pretty annoying. If NetworkManager in the installed system can't make use of the information I give the installer, at least NetworkManager should remember what I tell it directly.

Wearing a hat indicating slightly less ignorance: Why does NM choose an interface that doesn't have a signal over one that does? And why does it choose a different interface randomly rather than systematically?

Revision history for this message
to be removed (liw) wrote :

There was some discussion about this on IRC, and as a result I was directed to look at /etc/udev/rules.d/70-persistent-net.rules, which I attach. Two things:

1) It names the interfaces eth2 and eth3, instead of eth0 and eth1, which is going to surprise a number of people.

2) If I switch the names around, it seems to get the right interface (D-Link, r8169) every time I test. If I keep them as they are in the file now, it never gets the right one. This could indicate that whatever sets up the rules file should put the interface the user prefers in the installer as the first one.

I assume this makes it a bug in the installer, not in NetworkManager, but as I'm new to Ubuntu, I'll let someone else make that decision.

Revision history for this message
Alexander Sack (asac) wrote :

Lars, did you already defined what the "right interface" is?

Anyway, I see 3 issues here (please correct me or add more):

 1. network-manager does select an interface without a signal
 2. network-manager appears to connect to random interfaces, which could or could not be caused by 1.
 3. ubuntu-installer (i think alternate install that is) asks the user for an interface to use during install, but doesn't mention that this will only be used during install if network-manager is going to be installed.

Which issue should be tracked in this bug? Please file bugs for the other issues.

Thanks,
 - Alexander

Revision history for this message
to be removed (liw) wrote :

Alexander, I thought I did that already in my first message to this bug report: the D-Link card (r8169 driver, MAC 00:17:9a:3a:c9:52) is the right one, the VIA card is the wrong one (and has no cable attached).

That's also what I tell the installer, of course.

https://bugs.edge.launchpad.net/ubuntu/+source/udev/+bug/145382 may be relevant for my case.

Revision history for this message
Martin Pitt (pitti) wrote :

Wrt point 3) I don't think it is unreasonable to assume that the default interface chosen in the installer will also be the default interface in the installed system. So probably the installer should write persistent-net.rules, not udev at the first boot.

Revision history for this message
Alexander Sack (asac) wrote :

OK, lets use this bug for 1. then. 3. is an installer issue and network-manager has no chance to know which one to use.

Lars, your syslog log gets an IP through you via card, which definitly doesn't capture the bug "interface selected though no cable attached" ... can you get a syslog for that testcase please.

Thanks,

 - Alexander

Revision history for this message
Alexander Sack (asac) wrote :

... and please open a new bug for the installer and attach the info about the .rules file et al.

Please post the bug id you use for that issue.

Thanks,

 - Alexander

Revision history for this message
Alexander Sack (asac) wrote :

... oh forgot. if bug 134496 covers the installer issue mentioned by Martin, you won't need to open a bug for that of course.

Revision history for this message
Paul Dufresne (paulduf) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in network-manager:
assignee: nobody → dufresnep
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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