Skip to content

Commit

Permalink
Don't compile OVS kernel modules for functional job
Browse files Browse the repository at this point in the history
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] openvswitch/ovs@56de214

Related-bug: bug/1646107
Change-Id: Ic5419afe7170e759749afd7055441c82c317efe0
  • Loading branch information
cubeek committed Dec 1, 2016
1 parent 8e27076 commit b0ea7c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
14 changes: 9 additions & 5 deletions devstack/lib/ovs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
load_module openvswitch
load_module vport-geneve False
dmesg | tail
fi
load_module openvswitch
load_module vport-geneve False
dmesg | tail

cd $_pwd
}
Expand Down
9 changes: 8 additions & 1 deletion neutron/tests/contrib/gate_hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0ea7c9

Please sign in to comment.