From 0ba08d7eb488f1b7bd66448514f468c30f402a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20J=C3=B3zefczyk?= Date: Mon, 11 May 2020 08:54:08 +0000 Subject: [PATCH] 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] https://github.com/openvswitch/ovs/commit/59e994426645358a271a0c9f485e9defafffd474 Change-Id: I63b2f198468c9e30af8284c8033fa31f2af2518a --- devstack/lib/ovn_agent | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devstack/lib/ovn_agent b/devstack/lib/ovn_agent index 7ffa322588e..3022a7475b3 100644 --- a/devstack/lib/ovn_agent +++ b/devstack/lib/ovn_agent @@ -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