summaryrefslogtreecommitdiff
path: root/utilities/ovs-ctl.in
diff options
context:
space:
mode:
authorGurucharan Shetty <guru@ovn.org>2017-11-10 14:30:00 -0800
committerGurucharan Shetty <guru@ovn.org>2017-11-13 08:15:39 -0800
commita3c5fca1b51429171bb17507e74c25238ecda168 (patch)
treef53978a4095e8c3ff10d4fb587ae4c409981bbf6 /utilities/ovs-ctl.in
parentd9f79b6a5c2d8852f412b3a003d4d5ca172c63c4 (diff)
downloadopenvswitch-a3c5fca1b51429171bb17507e74c25238ecda168.tar.gz
ovs-ctl: Don't remember vport-* kernel modules
From OVS 2.8, ovs-vswitchd, when it starts, will load the kernel modules for tunnels. It has logic inside it to choose either upstream kernel module or vport-* kernel module. So, when we run 'force-reload-kmod' to upgrade to OVS 2.8 from a previous version, we do not need to remember the vport-* kernel module that was previously loaded. It is not really harmful to load vport-* kernel module though. On RHEL7.x and OVS 2.8, we use the upstream "geneve" kernel module for tunnels. But, on RHEL 7.x we have hit a bug caused by iptables startup script which tries to remove all kernel modules related to linux conntrack. It fails to unload openvswitch kernel module because it has a reference count on it. But it succeeds in unloading vport-geneve and in turn the upstream "geneve" kernel module. This causes the tunnels to go down. With this patch, we avoid the above situation, by not loading vport-geneve kernel module. ovs-vswitchd when it starts will load upstream geneve. And when "iptables stop" runs, since "geneve" has nothing to do with conntrack, it spares it. Ideally, we should fix this by incrementing the refcount on the kernel modules. Signed-off-by: Gurucharan Shetty <guru@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
Diffstat (limited to 'utilities/ovs-ctl.in')
-rwxr-xr-xutilities/ovs-ctl.in11
1 files changed, 0 insertions, 11 deletions
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 2e1209a26..f1b01d1d3 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -30,17 +30,9 @@ done
## start ##
## ----- ##
-# Keep track of removed vports so we can reload them if needed
-removed_vports=""
-
insert_mods () {
# Try loading openvswitch again.
action "Inserting openvswitch module" modprobe openvswitch
-
- for vport in $removed_vports; do
- # Don't treat failures to load vports as fatal error
- action "Inserting $vport module" modprobe $vport || true
- done
}
insert_mod_if_required () {
@@ -398,9 +390,6 @@ force_reload_kmod () {
for vport in `awk '/^vport_/ { print $1 }' /proc/modules`; do
action "Removing $vport module" rmmod $vport
- if ! grep -q $vport /proc/modules; then
- removed_vports="$removed_vports $vport"
- fi
done
if test -e /sys/module/openvswitch; then