Hi everyone,
I have noticed a problem with environment-modules since upgrading to
CentOS8. The startup file /usr/share/Modules/init/zsh modifies the
variable $FPATH that defines the function search path used by zsh. If
the variable is modified from its default, it is inherited by
singularity when running a container, breaking functionality if this
container has a different version of zsh.
Here's an example of this behaviour:
[wgs03] ~ % echo $FPATH
/usr/share/Modules/init/zsh-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.5.1/functions
[wgs03] ~ % singularity run /project/singularity/images/SL6.img
************************************************************************
* You are now running a shell in a Singularity container providing a *
* Scientific Linux 6 environment. Most things should just work as if *
* you had just logged in to such a system, but there are differences. *
************************************************************************
/etc/site/zshrc:72: compinit: function definition file not found
[wgs03:SL6] ~ % echo $FPATH
/usr/share/Modules/init/zsh-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.5.1/functions
If I remove environment-modules from the system, this problem doesn't occur:
[wgs03] ~ % echo $FPATH
/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.5.1/functions
[wgs03] ~ % singularity run /project/singularity/images/SL6.img
************************************************************************
* You are now running a shell in a Singularity container providing a *
* Scientific Linux 6 environment. Most things should just work as if *
* you had just logged in to such a system, but there are differences. *
************************************************************************
[wgs03:SL6] ~ % echo $FPATH
/usr/share/zsh/site-functions:/usr/share/zsh/4.3.11/functions
So every time, $FPATH is modified, it is inherited by the container. I'd
prefer it if zsh wouldn't modify $FPATH. Wouldn't it work as well if
_module was placed in /usr/share/zsh/site-functions? My test regarding
this was fine.
Regards,
Götz Waschk
--
Götz Waschk ° Phone: +49 33762 77169
Deutsches Elektronen-Synchrotron DESY ° E-Mail: goe...@de...
Platanenallee 6
15738 Zeuthen Germany
|