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

[Xen-changelog] Have the vif scripts expect the offline event, not the remove event. With



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 60bf9aa39043681828eda93cf769d2c5208d6922
# Parent  bb270cb5d2e850aa4fef20902c4d54f9d916f1ff
Have the vif scripts expect the offline event, not the remove event.  With
the remove event, the script environment variable has disappeared, so we must
hook on the offline event instead.  This fix was put into xen-backend.rules,
but not the vif scripts, so they were out of sync, and the interfaces were not
being properly closed down.

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

diff -r bb270cb5d2e8 -r 60bf9aa39043 tools/examples/vif-bridge
--- a/tools/examples/vif-bridge Tue Nov 15 14:54:51 2005
+++ b/tools/examples/vif-bridge Tue Nov 15 14:56:47 2005
@@ -60,7 +60,7 @@
         ifconfig "$vif" up || fatal "ifconfig $vif up failed"
         ;;
 
-    remove)
+    offline)
         # vifs are auto-removed from bridge.
         ifconfig "$vif" down || fatal "ifconfig $vif down failed"
         ;;
diff -r bb270cb5d2e8 -r 60bf9aa39043 tools/examples/vif-common.sh
--- a/tools/examples/vif-common.sh      Tue Nov 15 14:54:51 2005
+++ b/tools/examples/vif-common.sh      Tue Nov 15 14:56:47 2005
@@ -32,7 +32,7 @@
 fi
 
 case "$command" in
-    add | offline)
+    add | remove)
         exit 0
         ;;
 esac
diff -r bb270cb5d2e8 -r 60bf9aa39043 tools/examples/vif-nat
--- a/tools/examples/vif-nat    Tue Nov 15 14:54:51 2005
+++ b/tools/examples/vif-nat    Tue Nov 15 14:56:47 2005
@@ -45,7 +45,7 @@
         echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
         ipcmd='a'
         ;;
-    remove)
+    offline)
         ifconfig ${vif} down
         ipcmd='d'
         ;;
diff -r bb270cb5d2e8 -r 60bf9aa39043 tools/examples/vif-route
--- a/tools/examples/vif-route  Tue Nov 15 14:54:51 2005
+++ b/tools/examples/vif-route  Tue Nov 15 14:56:47 2005
@@ -31,7 +31,7 @@
         echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
         ipcmd='a'
         ;;
-    remove)
+    offline)
         ifdown ${vif}
         ipcmd='d'
         ;;

_______________________________________________
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®.