[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Only write a success node when coming online, not going offline. Delete the



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 701ec436d5adcabafb5338e478dd4d9793e5a320
# Parent  801c6363501b94b935e1946ddb3effee3ae6b2c2
Only write a success node when coming online, not going offline.  Delete the
interface from the bridge when going offline -- the comment stating that
interfaces are auto-removed does not seem to be true, at least some of the
time.  Log failure of brctl delif and ifconfig down only at debug level, as
this script may be called more than once, depending upon the hotplug
configuration.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 801c6363501b -r 701ec436d5ad tools/examples/vif-bridge
--- a/tools/examples/vif-bridge Fri Nov 25 17:09:49 2005
+++ b/tools/examples/vif-bridge Fri Nov 25 17:12:12 2005
@@ -61,12 +61,16 @@
         ;;
 
     offline)
-        # vifs are auto-removed from bridge.
-        ifconfig "$vif" down || log err "ifconfig $vif down failed"
+        brctl delif "$bridge" "$vif" ||
+          log debug "brctl delif $bridge $vif failed"
+        ifconfig "$vif" down || log debug "ifconfig $vif down failed"
         ;;
 esac
 
 handle_iptable
 
-log debug "Successful vif-bridge operation for $vif, bridge $bridge."
-success
+log debug "Successful vif-bridge $command for $vif, bridge $bridge."
+if [ "$command" == "online" ]
+then
+  success
+fi

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.