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:
parent
8e27076b32
commit
b0ea7c95a3
@ -89,7 +89,11 @@ function is_ovs_version_ok {
|
|||||||
|
|
||||||
# upgrade_ovs_if_necessary() - Check if OVS version is high enough ( >= 2.5.1)
|
# upgrade_ovs_if_necessary() - Check if OVS version is high enough ( >= 2.5.1)
|
||||||
# and upgrade if necessary.
|
# 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 {
|
function upgrade_ovs_if_necessary {
|
||||||
|
local compile_modules=${1:-True}
|
||||||
if ! is_ovs_version_ok; then
|
if ! is_ovs_version_ok; then
|
||||||
if [ "$NEUTRON_OVERRIDE_OVS_BRANCH" ]; then
|
if [ "$NEUTRON_OVERRIDE_OVS_BRANCH" ]; then
|
||||||
OVS_BRANCH=$NEUTRON_OVERRIDE_OVS_BRANCH
|
OVS_BRANCH=$NEUTRON_OVERRIDE_OVS_BRANCH
|
||||||
@ -105,14 +109,14 @@ function upgrade_ovs_if_necessary {
|
|||||||
fi
|
fi
|
||||||
echo "Compiling OVS branch: $OVS_BRANCH"
|
echo "Compiling OVS branch: $OVS_BRANCH"
|
||||||
remove_ovs_packages
|
remove_ovs_packages
|
||||||
compile_ovs True /usr /var
|
compile_ovs $compile_modules /usr /var
|
||||||
start_new_ovs
|
start_new_ovs
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# compile_ovs() - Compile OVS from source and load needed modules.
|
# compile_ovs() - Compile OVS from source and load needed modules.
|
||||||
# Accepts two parameters:
|
# 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
|
# - second optional parameter defines prefix for ovs compilation
|
||||||
# - third optional parameter defines localstatedir for ovs single machine runtime
|
# - third optional parameter defines localstatedir for ovs single machine runtime
|
||||||
# Env variables OVS_REPO_NAME, OVS_REPO and OVS_BRANCH must be set
|
# 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 make INSTALL_MOD_DIR=kernel/net/openvswitch modules_install
|
||||||
sudo modprobe -r vport_geneve
|
sudo modprobe -r vport_geneve
|
||||||
sudo modprobe -r openvswitch
|
sudo modprobe -r openvswitch
|
||||||
|
load_module openvswitch
|
||||||
|
load_module vport-geneve False
|
||||||
|
dmesg | tail
|
||||||
fi
|
fi
|
||||||
load_module openvswitch
|
|
||||||
load_module vport-geneve False
|
|
||||||
dmesg | tail
|
|
||||||
|
|
||||||
cd $_pwd
|
cd $_pwd
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,14 @@ case $VENV in
|
|||||||
|
|
||||||
configure_host_for_func_testing
|
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
|
load_conf_hook iptables_verify
|
||||||
# Make the workspace owned by the stack user
|
# Make the workspace owned by the stack user
|
||||||
|
Loading…
Reference in New Issue
Block a user