[LU-14074] LNet: lustre_rmmod fails after lnetctl is used Created: 26/Oct/20  Updated: 08/Feb/22  Resolved: 30/Jun/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.15.0

Type: Bug Priority: Minor
Reporter: Amir Shehata (Inactive) Assignee: Cyril Bordage
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-14627 Lost ref on lnet_peer in discovery le... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

After using the lnetctl utility a reference count is taken on the lnet modules and lnetctl lnet unconfigure needs to be called in order for lustre_rmmod to remove the lnet module.

I think it would be a good idea to modify lustre_rmmod to unconfigure lnet to avoid having to do it manually.

Steps to reproduce:

modprobe lustre
lnetctl lnet configure
lustre_rmmod 


 Comments   
Comment by Andreas Dilger [ 27/Oct/20 ]

I agree that this would be very useful. When this change is made, the code in lustre/scripts/lnet.in should be modified correspondingly:

-        lustre_rmmod ptlrpc || exit 1
-        lnetctl lnet unconfigure || exit 1
-        lustre_rmmod libcfs ldiskfs || exit 1
+       lustre_rmmod || exit 1

along with lustre/scripts/systemd/lnet.service.in:

-ExecStop=@sbindir@/lustre_rmmod ptlrpc
-ExecStop=@sbindir@/lnetctl lnet unconfigure
-ExecStop=@sbindir@/lustre_rmmod libcfs ldiskfs
+ExecStop=@sbindir@/lustre_rmmod
Comment by Gerrit Updater [ 19/Feb/21 ]

Cyril Bordage (cbordage@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41698
Subject: LU-14074 scripts: automatic LNet unconfigure
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4a61ed82c999a8d4449407de19aa6524a20214cf

Comment by Gerrit Updater [ 30/Jun/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41698/
Subject: LU-14074 scripts: automatic LNet unconfigure
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ebdf71a2df044c441ff633dbfc2f463520892bfb

Comment by Peter Jones [ 30/Jun/21 ]

Landed for 2.15

Generated at Sat Feb 10 03:06:37 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.