From 40e316910744429e2294bf353f85cb1061261d46 Mon Sep 17 00:00:00 2001 From: Gregoire Pichon Date: Wed, 3 Feb 2016 16:07:38 +0100 Subject: [PATCH] LU-7736 scripts: ensure lustre_rmmod unload all modules The luste_rmmod script unloads the lustre modules recursively from libcfs, unloading each dependent module first. If the module dependency order makes an LND module to be unloaded before the ptlrpc module, the LND unload fails and it results in lnet and libcfs modules still loaded at the end. # modprobe lustre # lctl list_nids 10.1.0.64@o2ib # lustre_rmmod Modules still loaded: lnet/lnet/lnet.o libcfs/libcfs/libcfs.o This patch ensures modules are all unloaded by the lustre_rmmod script. Signed-off-by: Gregoire Pichon Change-Id: Id94308332a4f5f95f4617f0d5882a9e2857ee20d Reviewed-on: http://review.whamcloud.com/18279 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Frederic Saunier Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/scripts/lustre_rmmod | 1 + 1 file changed, 1 insertion(+) diff --git a/lustre/scripts/lustre_rmmod b/lustre/scripts/lustre_rmmod index a4f81d8..8c07f78 100755 --- a/lustre/scripts/lustre_rmmod +++ b/lustre/scripts/lustre_rmmod @@ -30,6 +30,7 @@ unload_dep_module() { lsmod | grep obdclass > /dev/null && $LCTL dl lsmod | grep $FSTYPE > /dev/null && unload_dep_module $FSTYPE +lsmod | grep ptlrpc > /dev/null && unload_dep_module ptlrpc lsmod | grep libcfs > /dev/null && unload_dep_module libcfs MODULES=$($LCTL modules | awk '{ print $2 }') -- 1.8.3.1