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]> --- V2 - Move the changes to the ovs-kmod-ctl command as per Aaron Conole's suggestion. --- utilities/ovs-kmod-ctl.in | 19 +++++++++++++++++++ utilities/ovs-lib.in | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) 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 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 "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 () { diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index 6a958cb..765cd06 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,7 +621,6 @@ 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 -- 1.8.3.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
