-
Notifications
You must be signed in to change notification settings - Fork 48
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
set $LMOD_SHORT_TIME
to prevent Lmod from creating a user cache
#792
base: 2023.06-software.eessi.io
Are you sure you want to change the base?
Conversation
Instance
|
Instance
|
Instance
|
@@ -116,7 +116,11 @@ if [ -d $EESSI_PREFIX ]; then | |||
else | |||
error "Lmod SitePackage.lua file not found at $lmod_sitepackage_file" | |||
fi | |||
|
|||
|
|||
# set time until user cache is created to 1 day (86400 seconds), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day is a long time, what if they have their own modules? Can we set this as part of our own cache configuration instead so it is only relevant for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems not to be possible...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole point of setting it to 24h is to basically prevent that a user cache can ever be written.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that's a global setting, so it will also never build a cache for modules outside of EESSI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, but i) only when the EESSI environment is set up, ii) that will "only" lead to longer waiting times when running module
commands, there's no other negative side effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there's another way to prevent that specific paths (like /cvmfs/software.eessi.io/...
) are included in the user cache, not sure.
@rtmclay would know... :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the EESSI/2023.06
module that we ship, this path is protected:
software-layer/init/modules/EESSI/2023.06.lua
Lines 121 to 124 in 901a944
if ( mode() ~= "spider" ) then | |
prepend_path("MODULEPATH", eessi_module_path) | |
eessiDebug("Adding " .. eessi_module_path .. " to MODULEPATH") | |
end |
so this wouldn't happen with that approach.
On some systems, Lmod may configured to create a user cache (in
~/.cache/lmod
) after a very short amount of time, for example on Vega:So if a
module
command takes longer than 2 seconds, which can happen if CernVM-FS has to pull in an updated Lmod cache first from the EESSI repository, then a user cache will be auto-generated, which (by default) will be considered valid for 24h.We should prevent that this happens, since it can easily lead to confusion when a module file is available under
/cvmfs/software.eessi.io
, but it's not visible viamodule avail
(and if Lmod is configured withLMOD_CACHED_LOADS
enabled, you won't be able to load it either, despite it being there).Draft PR, since this script is not the only place we should set
$LMOD_SHORT_TIME
if we want to take control of this...