WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Only write a success node when coming online, not going offline. Delete the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 26 Nov 2005 02:36:08 +0000
Delivery-date: Sat, 26 Nov 2005 02:36:29 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Only write a success node when coming online, not going offline. Delete the, Xen patchbot -unstable <=