[ovs-dev] [PATCH V3 1/2] utilities: On RHEL 7 systems clean up after upgrade

Greg Rose gvrose8192 at gmail.com
Fri Jun 29 18:18:13 UTC 2018

When upgrading from older versions of OVS that used the built-in geneve
kernel module on RHEL 7 systems to newer versions that use the 'compat'
vport_geneve and vport_vxlan drivers we need to clean up some cruft
that might have been left over after the upgrade.

Remove any genev_sys_6081 and vxlan_sys_4789 interfaces and then if
the RHEL 7 geneve or vxlan built-in drivers are loaded remove them
before loading the new drivers.

Removing the geneve and vxlan built-in drivers will prevent occurrences
of the "unassociated datapath" errors that can sometimes occur in some

Signed-off-by: Greg Rose <gvrose8192 at gmail.com>


V3 - Split out part of the patch as per review suggestion from
 utilities/ovs-kmod-ctl.in | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/utilities/ovs-kmod-ctl.in b/utilities/ovs-kmod-ctl.in
index 7c50d64..9b09e22 100644
--- a/utilities/ovs-kmod-ctl.in
+++ b/utilities/ovs-kmod-ctl.in
@@ -72,6 +72,25 @@ remove_kmods() {
     if test -e /sys/module/openvswitch; then
         action "Removing openvswitch module" rmmod openvswitch
+    # Older releases may be using the rtnetlink interface while a
+    # newer release will want to use the internal compat interface
+    # for geneve and vxlan.
+    if test -e /sys/class/net/genev_sys_6081; then
+        action "ip link del link genev_sys_6081 dev genev_sys_6081" \
+                ip link del link genev_sys_6081 dev genev_sys_6081
+    fi
+    if test -e /sys/class/net/vxlan_sys_4789; then
+        action "ip link del link vxlan_sys_4789 dev vxlan_sys_4789" \
+                ip link del link vxlan_sys_4789 dev vxlan_sys_4789
+    fi
+    if test -e /sys/module/geneve; then
+        action "rmmod geneve" rmmod geneve
+    fi
+    if test -e /sys/module/vxlan; then
+        action "rmmod vxlan" rmmod vxlan
+    fi
 usage () {

More information about the dev mailing list