Skip to contentSkip to conversation

do ifdown netdev before shutting down vif0

RFC PATCH In review Kirk Allan 2 participants 3 messages Oct 12, 2006

lore
Share & tools
lore

Kirk Allan

author
#0 lore raw

RFC PATCH 1/1 do ifdown netdev before shutting down vif0

I've been trying to track down an occasional system hang when doing /etc/xen/scripts/network-bridge stop. Would it be reasonable to do the fdown ${netdev} and then set ${vif0} down to provide ifdown with a behavior that is as close as possible to a real network card?

Signed- off- by: Kirk Allan <[email protected]>

tools/examples/network-bridge +1 -1
@@ -243,12 +243,12 @@
     fi
 
     if link_exists "$pdev"; then
-	ip link set dev ${vif0} down
 	mac=`ip link show ${netdev} | grep 'link\/ether' | sed -e 's/.*ether \(..:..:..:..:..:..\).*/\1/'`
 	transfer_addrs ${netdev} ${pdev}
 	if ! ifdown ${netdev}; then
 	    get_ip_info ${netdev}
 	fi
+	ip link set dev ${vif0} down
 	ip link set ${netdev} down arp off
 	ip link set ${netdev} addr fe:ff:ff:ff:ff:ff
 	ip link set ${pdev} down

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 2 lines

I've been trying to track down an occasional system hang when doing /etc/xen/scripts/network-bridge stop. Would it be reasonable to do

the

Quoted 2 lines

fdown ${netdev} and then set ${vif0} down to provide ifdown with a behavior that is as close as possible to a real network card?

Does this fix the hang?

Making changes to this script in the past has been extremely painful as it invariably breaks one distro or another -- usually gentoo :)

Would be good to have some other eyes look at this.

Ian

author
#2 lore raw
Quoted 6 lines
Quoted 2 lines

I've been trying to track down an occasional system hang when doing
/etc/xen/scripts/network- bridge stop. Would it be reasonable to do

the

Quoted 2 lines

fdown ${netdev} and then set ${vif0} down to provide ifdown with a behavior that is as close as possible to a real network card?

Quoted 8 lines

Does this fix the hang?

Making changes to this script in the past has been extremely painful as it invariably breaks one distro or another -- usually gentoo :)

Would be good to have some other eyes look at this.

Ian

I've been testing this on SLES 10 and the patch doesn't seem to be harmful. But like you said, network-bridge is very fragile, so it would be good to get input from others.

Quoted 1 line

From what I understand this may be a SLES 10 issue where the hang happens when a) the ethernet device used for the external connection is configured for dhcp, and b) there exists at least one process that has been started from a NFS share. This patch would be part one of a two part fix. The second part, currently being worked, would address the ifdown/ifdown-dhcp with NFS issue.

Kirk