Description of problem: After next steps in loop: - creating bridge - adding interface to the bridge - deleting interface from bridge - deleting bridge real ethernet interface can be shut down. Version-Release number of selected component (if applicable): initscripts-8.45.17.EL-1 How reproducible: Always Steps to Reproduce: 1. # ifconfig eth0 up 2. for ((i=0; i < 10; i++)); do brctl addbr br0 brctl addif br0 eth0 brctl delif br0 eth0 brctl delbr br0 done Actual results: # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:0C:29:B2:BE:FA BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:1064 errors:0 dropped:0 overruns:0 frame:0 TX packets:3698 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:90044 (87.9 KiB) TX bytes:4778800 (4.5 MiB) Interrupt:169 Base address:0x2000 Expected results: # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:0C:29:B2:BE:FA inet addr:192.168.52.130 Bcast:192.168.52.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:feb2:befa/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1052 errors:0 dropped:0 overruns:0 frame:0 TX packets:3686 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:89252 (87.1 KiB) TX bytes:4776920 (4.5 MiB) Interrupt:169 Base address:0x2000 Additional info: kernel 2.6.18-53.1.4.el5
Assigning to kernel - this example isn't actually doing anything in initscripts.
No, i think it is initscripts bug. Analysis: When bridge is removed then: - udevd executes /etc/sysconfig/network-scripts/net.hotplug (see /etc/udev/rules.d/60-net.rules) with ACTION==unregister - net.hotplug executes "/sbin/ifdown br0" - /sbin/ifdown calls /etc/sysconfig/network-scripts/ifdown-eth ifcfg-eth0 See restricted udevmonitor output: UEVENT[1194549743.798732] add@/class/net/br0 UDEV [1194549743.807660] add@/class/net/br0 UEVENT[1194549744.250802] remove@/class/net/br0 UDEV [1194549744.251577] remove@/class/net/br0 UEVENT[1194549744.257474] add@/class/net/br0 UEVENT[1194549744.709364] remove@/class/net/br0 UEVENT[1194549744.713048] add@/class/net/br0 UEVENT[1194549745.173957] remove@/class/net/br0 UEVENT[1194549745.179690] add@/class/net/br0 UDEV [1194549745.643538] add@/class/net/br0 UEVENT[1194549745.654329] remove@/class/net/br0 UEVENT[1194549745.656494] add@/class/net/br0 UEVENT[1194549746.141029] remove@/class/net/br0 UEVENT[1194549746.145332] add@/class/net/br0 UEVENT[1194549746.584747] remove@/class/net/br0 UEVENT[1194549746.588475] add@/class/net/br0 UEVENT[1194549747.083554] remove@/class/net/br0 UEVENT[1194549747.089255] add@/class/net/br0 UEVENT[1194549747.544509] remove@/class/net/br0 UEVENT[1194549747.548615] add@/class/net/br0 UDEV [1194549747.983485] remove@/class/net/br0 UEVENT[1194549748.001215] remove@/class/net/br0 ... After event "UEVENT add" udevd handled "remove". br0 existed then "remove" was handled. eth0 was added to br0 => br0 has same ethernet address with eth0. Script /sbin/ifdown executed /etc/sysconfig/network-scripts/ifdown-eth ifcfg-eth0
It's still a kernel bug, AFAICT. The only way for: brctl delif br0 eth0 brctl delbr br0 to generate a remove event for br0 with the hardware address of eth0 is if delif returns before the bridge actually processes the removal.
OK, I see what you're saying, but it still doesn't make much sense. You're adding the interface to the bridge. The interface is not supposed to have an IP address on the bridge - the bridge is where you configure the IP address. To get what you describe, you'd have to be adding and removing an already configured interface to the bridge, which is essentially a configuration error. Ergo, closing.
We can't add interface to the bridge if one is up?
I know about IP address on the interface. This problem also occurs when eth0 doesn't have IP.