[ovs-dev] [PATCH] ovs-ctl: Remove rtnetlink geneve and vxlan interfaces

Greg Rose gvrose8192 at gmail.com
Wed Jun 26 21:25:45 UTC 2019


Bug 2128511 is a result of a conflict that arises when upgrading
on RHEL 7.x systems when the built-in geneve and vxlan kernel modules
were in use before the upgrade but then the newer compat geneve
and vxlan interfaces embedded in the openvswitch kernel module
are used after the upgrade.

This patch fixes the problem by deleting the rtnetlink based geneve
and vxlan interfaces before executing the kernel module reload.

VMware-BZ: 2128511
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
---
 utilities/ovs-lib.in | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index fa840ec..dbb6179 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -632,6 +632,20 @@ force_reload_kmod () {
         action "Removing datapath: $dp" ovs-dpctl del-dp "$dp"
     done
 
+    # Older releases may be using the rtnetlink interface while a
+    # newer release will want to use the internal compat interface
+    # for geneve and vxlan.  Execute these blind - if they exist
+    # as rtnetlink type interfaces then they'll be removed, if not
+    # then the error is ignored and no harm is done.
+    action "ip link del link genev_sys_6081 dev genev_sys_6081"
+    action "ip link del link vxlan_sys_4789 dev vxlan_sys_4789"
+
+    action "ovs-appctl dpctl/flush-conntrack"
+
+    for vport in `awk '/^vport_/ { print $1 }' /proc/modules`; do
+        action "Removing $vport module" rmmod $vport
+    done
+
     if test -e /sys/module/ip_gre; then
         action "Forcing removal of ip_gre module" rmmod ip_gre
     fi
-- 
1.8.3.1



More information about the dev mailing list