[ovs-dev] [branch-2.3] ovs-ctl: Remove vport_* modules when downgrade from branches > 2.3.

Alex Wang alexw at nicira.com
Tue May 26 23:28:45 UTC 2015


When downgrading from current master to branch-2.3, the 'force-reload-kmod'
can fail due to not removing 'vport_*' modules, this commit fixes this by
making sure 'vport_*' are removed correctly.

Reported-by: Mark Hamilton <mhamilton at vmware.com>
Signed-off-by: Alex Wang <alexw at nicira.com>
---
 utilities/ovs-ctl.in |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index f765553..46a6fb1 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -378,6 +378,11 @@ force_reload_kmod () {
         action "Removing datapath: $dp" ovs-dpctl del-dp "$dp"
     done
 
+    # For downgrading from branches > 2.3 back to 2.3
+    for vport in `awk '/^vport_/ { print $1 }' /proc/modules`; do
+        action "Removing $vport module" rmmod $vport
+    done
+
     # try both old and new names in case this is post upgrade
     if test -e /sys/module/openvswitch_mod; then
         action "Removing openvswitch module" rmmod openvswitch_mod
-- 
1.7.9.5




More information about the dev mailing list