Bug 314551

Summary: udev incorrectly renames a network interface
Product: [Fedora] Fedora Reporter: Ashish Shukla <wahjava>
Component: kernel-xenAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-09 21:32:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg output
none
Output of commands before power-cycling modem
none
Output of commands after power-cycling modem none

Description Ashish Shukla 2007-10-01 19:16:47 UTC
Description of problem:
I've 3 physical network interfaces (1 PCI NIC rtl8159 - eth0, 1 Onboard NIC e100
- eth1, and 1 USB NIC cdc-ether - eth2). All 3 physical interfaces work fine
(and initialized to their default names) when running default 'kernel'. In
'kernel-xen' (running as domain 0) at startup all NICs are initialized to their
default names, but when 'eth2' is disconnected and reconnected, it gets detected
as 'eth3', whereas 'eth2' used to be still present, but MAC address changed to
'00:00:00:00:00:00'.

Version-Release number of selected component (if applicable):
kernel-xen-2.6.20-2936.fc7
udev-113-12.fc7


How reproducible:
Reproducible everytime.

Steps to Reproduce:
1. Turn off the ADSL modem (to which eth2 is connected).
2. Turn on the ADSL modem, now eth3 will appear, but eth2's MAC address gets
changed to "00:00:00:00:00:00".

  
Actual results:
The 'eth2' interface now gets detected as 'eth3' whereas 'eth2' is still present.

Expected results:
'eth2' should be always detected as 'eth2'.

Additional info:
The 'dmesg' output is attached.

Comment 1 Ashish Shukla 2007-10-01 19:16:47 UTC
Created attachment 212711 [details]
dmesg output

Comment 2 Daniel Berrangé 2007-10-09 15:20:54 UTC
Please provide output of

  - 'ifconfig -a'
  - 'brctl show'
  - 'lshal'

Please capture the data both before and after  unplugging & reconnecting the
ADSL modem.


Comment 3 Ashish Shukla 2007-10-09 19:53:27 UTC
Created attachment 221711 [details]
Output of commands before power-cycling modem

Comment 4 Ashish Shukla 2007-10-09 19:53:52 UTC
Created attachment 221721 [details]
Output of commands after power-cycling modem

Comment 5 Daniel Berrangé 2007-10-09 21:32:11 UTC
Ok, so the problem is thus:

  - When booting the kernel-xen, XenD will start (/etc/init.d/xend script)
  - XenD by default attempts to place your primary active NIC into a bridge at
boot time
  - You have 3 nics, eth0, eth1, and eth2. It looks like eth2 is the only active
NIC. Therefore XenD puts eth2 into a bridge
  - When eth2 is enslaved, it gets renamed to peth2, and 'eth2' becomes the
bridge device
  - When you turn off the modem, the physical device, peth2,  goes away. The
bridge, eth2, stays around.
  - When you turn it back on,  eth2 (the bridge) is still there, so your modem
gets eth3.

The core issue here is that XenD's bridging setup assumes that your primary NIC
never goes away. There is no way to fix it work with dynamic devices which come
& go, so the best option is to turn it off, or ensure that another permanently
connected device is always active at boot.

To turn it off, edit /etc/xen/xend-config.sxp and find the line refering to

 (network-script network-bridge)

And change it to

 (network-script /bin/true)

This will ensure that your ADSL modem device, or any other device, is never
bridged by XenD at boot time.