]> git.proxmox.com Git - ovs.git/commitdiff
utilities: On RHEL 7 systems clean up after upgrade
authorGreg Rose <gvrose8192@gmail.com>
Fri, 29 Jun 2018 18:18:13 +0000 (11:18 -0700)
committerJustin Pettit <jpettit@ovn.org>
Fri, 29 Jun 2018 22:57:47 +0000 (15:57 -0700)
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
environments.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
utilities/ovs-kmod-ctl.in

index 7c50d642286a7b312a0e261c76bb83c30a1dbb30..13ccfcf733639ddf79314d2ca437d580469c8536 100644 (file)
@@ -72,6 +72,25 @@ remove_kmods() {
     if test -e /sys/module/openvswitch; then
         action "Removing openvswitch module" rmmod openvswitch
     fi
+
+    # 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 "Removing geneve device" \
+                ip link del link genev_sys_6081 dev genev_sys_6081
+    fi
+    if test -e /sys/class/net/vxlan_sys_4789; then
+        action "Removing vxlan device" \
+                ip link del link vxlan_sys_4789 dev vxlan_sys_4789
+    fi
+
+    if test -e /sys/module/geneve; then
+        action "Forcing removal of geneve module" rmmod geneve
+    fi
+    if test -e /sys/module/vxlan; then
+        action "Forcing removal of vxlan module" rmmod vxlan
+    fi
 }
 
 usage () {