Don't compile OVS kernel modules for functional job

The only reason we need newer openvswitch is following fix [1] for
user-space part of openvswitch. This patch fixes our
test_install_flood_to_tun tests.

Current 2.6 branch has issues with ovsdb where connection with native
interface is getting lost and functional job gets stuck. To mitigate
that, this patch switches back to OVS 2.5.1 version for functional jobs,
compiling only user-space part as OVS 2.5.1 kernel modules are not
supported by Xenial.

Fullstack job remains running with 2.6 because the job needs OVS kernel patch
for local VXLAN tunneling.

[1] 56de2148f6

Related-bug: bug/1646107
Change-Id: Ic5419afe7170e759749afd7055441c82c317efe0
This commit is contained in:
Jakub Libosvar 2016-11-30 09:33:42 -05:00
parent 8e27076b32
commit b0ea7c95a3
2 changed files with 17 additions and 6 deletions

View File

@ -89,7 +89,11 @@ function is_ovs_version_ok {
# upgrade_ovs_if_necessary() - Check if OVS version is high enough ( >= 2.5.1)
# and upgrade if necessary.
# Accepts one optional parameter for kernel modules compilation:
# - first parameter is True by default and it means OVS will be
# compiled with kernel modules. False won't compile kernel modules.
function upgrade_ovs_if_necessary {
local compile_modules=${1:-True}
if ! is_ovs_version_ok; then
if [ "$NEUTRON_OVERRIDE_OVS_BRANCH" ]; then
OVS_BRANCH=$NEUTRON_OVERRIDE_OVS_BRANCH
@ -105,14 +109,14 @@ function upgrade_ovs_if_necessary {
fi
echo "Compiling OVS branch: $OVS_BRANCH"
remove_ovs_packages
compile_ovs True /usr /var
compile_ovs $compile_modules /usr /var
start_new_ovs
fi
}
# compile_ovs() - Compile OVS from source and load needed modules.
# Accepts two parameters:
# - first one is True, modules are built and installed.
# - first one is True by default and means that modules are built and installed.
# - second optional parameter defines prefix for ovs compilation
# - third optional parameter defines localstatedir for ovs single machine runtime
# Env variables OVS_REPO_NAME, OVS_REPO and OVS_BRANCH must be set
@ -175,10 +179,10 @@ function compile_ovs {
sudo make INSTALL_MOD_DIR=kernel/net/openvswitch modules_install
sudo modprobe -r vport_geneve
sudo modprobe -r openvswitch
fi
load_module openvswitch
load_module vport-geneve False
dmesg | tail
fi
cd $_pwd
}

View File

@ -44,7 +44,14 @@ case $VENV in
configure_host_for_func_testing
upgrade_ovs_if_necessary
# Kernel modules are not needed for functional job. They are needed only
# for fullstack because of bug present in Ubuntu Xenial kernel version
# that makes VXLAN local tunneling fail.
if [[ "$VENV" =~ "dsvm-functional" ]]; then
compile_modules=False
NEUTRON_OVERRIDE_OVS_BRANCH=v2.5.1
fi
upgrade_ovs_if_necessary $compile_modules
load_conf_hook iptables_verify
# Make the workspace owned by the stack user