On 6/25/2018 2:27 PM, Aaron Conole wrote:
Hi Greg,
Greg Rose <[email protected]> writes:

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 <[email protected]>
---
  utilities/ovs-lib.in | 21 ++++++++++++++++++++-
  1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index 6a958cb..5c07760 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -605,6 +605,7 @@ force_reload_kmod () {
      stop_ovsdb
      start_ovsdb || return 1
+ action "ovs-appctl dpctl/flush-conntrack" ovs-appctl dpctl/flush-conntrack
      stop_forwarding
if action "Saving interface configuration" save_interfaces; then
@@ -620,10 +621,28 @@ force_reload_kmod () {
      for dp in `ovs-dpctl dump-dps`; do
          action "Removing datapath: $dp" ovs-dpctl del-dp "$dp"
      done
-    action "ovs-appctl dpctl/flush-conntrack"
ovs_kmod_ctl remove + # 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
+
Thanks for the patch.

Please move this section to the ovs_kmod_ctl utility; it will ensure
that the module removal is allowed by the selinux policy.

Ah, I missed that!  Thanks for the review Aaron.  I'll spin up a rev2 with your suggestion incorporated.

- Greg


      # Start vswitchd by asking it to wait till flow restore is finished.
      flow_restore_wait
      start_forwarding || return 1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to