From c30a6d47c882e0278b4c5090ed72369a43eac425 Mon Sep 17 00:00:00 2001 From: snehring Date: Wed, 17 Apr 2024 11:09:17 -0500 Subject: [PATCH] LU-17587 build: use kernel version from dkms for client The current behavior of the dkms build for clients is to only build for the running kernel. This is fine if the other kernels are ABI compatible with the running kernel because we tell dkms to run weak-updates as part of the install process. However, if kernels that are not ABI compatible with the running kernel are installed they won't be targeted and weak-updates won't add in the modules. This could be worked around by running 'dkms install' once booted into the new kernel, but that's additional administrator overhead and not the assumed behavior for a dkms module. This modifies the dkms build script to accept the kernel version from dkms and configure for that version. It also changes the behavior of dkms wrt lustre to disable weak module updates since we're now building for individual kernel versions. This will likely result in longer times to install the client since we're building for each installed version of the kernel, but it _should_ mean the client is actually installed for each version. Lustre-change: https://review.whamcloud.com/54830 Lustre-commit: aa76ae0c21a7e315ecb1fded82f2c793aa26f78c Signed-off-by: snehring Change-Id: I55fb1bb7159772d7ecd9d1837e870c7097c02d78 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54965 Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Reviewed-by: Shaun Tancheff Tested-by: Maloo Tested-by: jenkins --- lustre-dkms_pre-build.sh | 2 +- lustre/scripts/dkms.mkconf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre-dkms_pre-build.sh b/lustre-dkms_pre-build.sh index 11a1cb0..9ac7049 100755 --- a/lustre-dkms_pre-build.sh +++ b/lustre-dkms_pre-build.sh @@ -10,7 +10,7 @@ case $1 in lustre-client) SERVER="--disable-server" - KERNEL_STUFF="" + KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4" ;; lustre-zfs|lustre-all) diff --git a/lustre/scripts/dkms.mkconf b/lustre/scripts/dkms.mkconf index 2cd7cb5..b0354d3 100755 --- a/lustre/scripts/dkms.mkconf +++ b/lustre/scripts/dkms.mkconf @@ -38,6 +38,7 @@ fi cat >>${filename} <