-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module-info mode returns "load" when running module spider #739
Comments
Yes, load hooks are a much nicer solution to achieve this: |
I have found the issue and fixed it for me. Please test Lmod 8.7.54 to see if it works for you. Note that as @wpoely86 says, the load_hooks are a much nicer solution. They are even better as solution as of 8.7.54. Please read the updated documentation to see if it works for you. |
Yes, I said it in the initial issue also. I am working on setting up a SitePackage with load hooks right now. Much nicer! The old logging code was inherited, and have been used for many years. I am not trying to defend that solution, I just mentioned it to explain how I ran into this issue. I will test the new version next week. Thanks. |
Describe the bug
When running
module spider
ormodule avail
the tcl functionmodule-info mode load
is true, andmodule-info mode
return "load". This is not exepected as the module is not being loaded.I have tested using Lmod 8.7.53 packages from EPEL on Rocky Linux 8 and 9.
Example tcl and lua module:
(Please excuse these horrible module file examples, I am sure there are better ways than
exec bash
to show this)Run spider:
Log results:
So for the tcl module
module-info mode
returnsload
while the Lua module'smode()
returnsspider
.Additional context
We are upgrading from el7 to el9. We have been using Lmod packages from EPEL so Lmod gets upgraded from 8.2.7 to 8.7.53. We have code in individual module files to log module loads:
A simplified version of
logToSyslog
is something like this:This have worked fine with Lmod 8.2.7 and earlier, but with 8.7.53 every single module version is logged as being loaded when running
module spider
.After checking the documentation I realize that we should probably replace this with a load hook. But the current behavior still seems wrong.
I have not tested using versions between 8.2 and 8.7 to determine when this changed, only checked the ChangeLogs without finding anything.
The text was updated successfully, but these errors were encountered: