Whamcloud - gitweb
LU-17587 build: use kernel version from dkms for client 30/54830/2
authorsnehring <snehring@iastate.edu>
Wed, 17 Apr 2024 16:09:17 +0000 (11:09 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Apr 2024 06:58:31 +0000 (06:58 +0000)
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 <snehring@iastate.edu>
Change-Id: I55fb1bb7159772d7ecd9d1837e870c7097c02d78
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54830
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre-dkms_pre-build.sh
lustre/scripts/dkms.mkconf

index ce298cb..54f9cc4 100755 (executable)
@@ -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)
index 705b8ef..ce43653 100755 (executable)
@@ -37,6 +37,7 @@ EOF
 fi
 cat >>${filename} <<EOF
 AUTOINSTALL="yes"
+NO_WEAK_MODULES="yes"
 MAKE[0]="make"
 # just have to set STRIP[0], it will become the new default.
 STRIP[0]="\$(