Skip OVS module compilation for kernels newer than 5.5

For now OVS doesn't support compilation of kernel module
for kernels newer than 5.5 [1].
Recently Fedora 31 upgraded the kernel to 5.6.8 and that is
why the periodic jobs started to fail [2].
By default we enabled OVS module compilation because Ubuntu
Bionic one doesn't have support for Openflow Meter actions.

In case flag OVN_BUILD_MODULES is set to True and kernel is
newer than 5.5 lets skip the module compilation with proper log.

Closes-Bug: #1877377

[1] https://zuul.openstack.org/builds?job_name=neutron-ovn-tempest-ovs-master-fedora
[2] 59e9944266

Change-Id: I63b2f198468c9e30af8284c8033fa31f2af2518a
This commit is contained in:
Maciej Józefczyk 2020-05-11 08:54:08 +00:00
parent 08e9ec1b56
commit 0ba08d7eb4
1 changed files with 9 additions and 0 deletions

View File

@ -355,6 +355,15 @@ function _compile_ovs {
_prepare_for_ovs_compilation $build_modules
KERNEL_VERSION=$(uname -r)
major_version=$(echo "${KERNEL_VERSION}" | cut -d '.' -f1)
patch_level=$(echo "${KERNEL_VERSION}" | cut -d '.' -f2)
if [ "${major_version}" -gt 5 ] || [ "${major_version}" == 5 ] && [ "${patch_level}" -gt 5 ]; then
echo "NOTE: KERNEL VERSION is ${KERNEL_VERSION} and OVS doesn't support compiling "
echo "Kernel module for version higher than 5.5. Skipping module compilation..."
build_modules="False"
fi
pushd $DEST/$OVS_REPO_NAME
[ -f configure ] || ./boot.sh
if [ ! -f config.status ] || [ configure -nt config.status ] ; then