Whamcloud - gitweb
LU-12019 build: remove global depmod.d conf from debs 25/54025/2
authorTimothy Day <timday@amazon.com>
Tue, 13 Feb 2024 17:40:25 +0000 (17:40 +0000)
committerOleg Drokin <green@whamcloud.com>
Sat, 23 Mar 2024 05:54:37 +0000 (05:54 +0000)
Lustre should not be creating a global depmod.d configuration
file that affects the load order of all modules installed
on the system.

Yet, Lustre has a depmod.d configuration file that attempts
to mirror the default configuration (the man page is
identical for Debian):

https://manpages.ubuntu.com/manpages/xenial/en/man5/depmod.d.5.html

 "By default, depmod will give a higher priority to a
  directory with the name updates using this built-in
  search string: "updates built-in" but more complex
  arrangements are possible and are used in several
  popular distributions."

However, when we switched from:

 search updates built-in

to:

 search updates/kernel built-in

Ubuntu depmod was forced to prefer build-in modules, since
the modules are not in `updates/kernel` as in Debian. If a
user has third party modules installed on their system, this
could make Ubuntu load the wrong module by default.

This patch removes the lustre.conf depmod.d file. By
leaving these load-order decisions to the distribution, this
patch addresses the regression on Ubuntu.

Fixes: 7ea4e0c ("LU-12019 build: Recognize Debian Kernel and set KMP dir")
Test-Parameters: trivial clientdistro=ubuntu2204
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I96fe1c0e64c48d045d46d62a10e8c8bd6ad2cb7d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54025
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Thomas Stibor <thomas@stibor.net>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
debian/postinst
debian/postrm

index 7f81f9a..9338dbe 100755 (executable)
@@ -9,10 +9,4 @@
 # Script run before Lustre module/utils are installed
 #
 
-DEPMOD_DIR="/etc/depmod.d"
-LUSTRE_DEPMOD_FILE="${DEPMOD_DIR}/lustre.conf"
-
-[ ! -d ${DEPMOD_DIR} ] && { mkdir -p ${DEPMOD_DIR}; }
-[ ! -e ${LUSTRE_DEPMOD_FILE} ] && { echo "search updates/kernel built-in" > ${LUSTRE_DEPMOD_FILE}; }
-
 depmod -a
index eae5bbc..1f6241f 100755 (executable)
@@ -9,11 +9,4 @@
 # Script run before Lustre module/utils are removed
 #
 
-DEPMOD_DIR="/etc/depmod.d"
-LUSTRE_DEPMOD_FILE="${DEPMOD_DIR}/lustre.conf"
-
-[ -e ${LUSTRE_DEPMOD_FILE} ] && { rm -f ${LUSTRE_DEPMOD_FILE}; }
-# If DEPMOD_DIR is empty, we also created it, thus remove it.
-[ ! "$(ls -A ${DEPMOD_DIR} 2>/dev/null)" ] && { rm -rf ${DEPMOD_DIR}; }
-
 depmod -a