From: snehring Date: Wed, 17 Apr 2024 16:09:17 +0000 (-0500) Subject: LU-17587 build: use kernel version from dkms for client X-Git-Tag: 2.15.63~2 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=aa76ae0c21a7e315ecb1fded82f2c793aa26f78c;p=fs%2Flustre-release.git 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. Signed-off-by: snehring Change-Id: I55fb1bb7159772d7ecd9d1837e870c7097c02d78 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54830 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Shaun Tancheff Reviewed-by: Timothy Day Reviewed-by: Oleg Drokin --- diff --git a/lustre-dkms_pre-build.sh b/lustre-dkms_pre-build.sh index ce298cb..54f9cc4 100755 --- a/lustre-dkms_pre-build.sh +++ b/lustre-dkms_pre-build.sh @@ -22,7 +22,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 705b8ef..ce43653 100755 --- a/lustre/scripts/dkms.mkconf +++ b/lustre/scripts/dkms.mkconf @@ -37,6 +37,7 @@ EOF fi cat >>${filename} <