[ovs-dev] [PATCH] patch to remove standard linux bridge on startup of openvswitch

Patrick Mullaney pm.mullaney at gmail.com
Tue Dec 14 18:48:13 UTC 2010


openvswitch: starting on a system with the native bridge loaded fails

---

 xenserver/etc_init.d_openvswitch |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
index 4820da6..166da35 100755
--- a/xenserver/etc_init.d_openvswitch
+++ b/xenserver/etc_init.d_openvswitch
@@ -175,7 +175,19 @@ function remove_all_dp {
     done
 }
 
+function ifdown_all_bridge {
+    for intr in `ls /sys/class/net/` ; do
+        if test -d /sys/class/net/$intr/bridge ; then
+            action "ifdown  $intr" ifdown "$intr"
+        fi
+    done
+}
+
 function insert_modules_if_required {
+    if lsmod | grep -q "bridge"; then
+        ifdown_all_bridge
+        action "removing bridge module" rmmod bridge
+    fi
     if ! lsmod | grep -q "openvswitch_mod"; then
         action "Inserting llc module" modprobe llc
         action "Inserting openvswitch module" modprobe openvswitch_mod





More information about the dev mailing list