Bug 513583 - module unload not working if the modulefile is outside of the modulefiles directory
module unload not working if the modulefile is outside of the modulefiles dir...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: environment-modules (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Orion Poplawski
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-24 07:28 EDT by Milos Jakubicek
Modified: 2009-09-24 02:07 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-23 17:12:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Milos Jakubicek 2009-07-24 07:28:25 EDT
Description of problem:

It seems that "module unload <modulefile>" works only if <modulefile> is inside of /usr/share/Modules/modulefiles/ (and probably also /etc/modulefiles, didn't test this)

Version-Release number of selected component (if applicable):

environment-modules-3.2.6-7.fc11.x86_64

How reproducible:

Always

Steps to Reproduce:

>module load /usr/share/mpich2/mpich2.module
>module list
Currently Loaded Modulefiles:
  1) /usr/share/mpich2/mpich2.module
>module unload /usr/share/mpich2/mpich2.module
>module list
Currently Loaded Modulefiles:
  1) /usr/share/mpich2/mpich2.module
>module purge
>module list
No Modulefiles Currently Loaded.
>cp /usr/share/mpich2/mpich2.module /usr/share/Modules/modulefiles/
>module load mpich2.module
>module list
Currently Loaded Modulefiles:
  1) mpich2.module
>module unload mpich2.module
>module list
No Modulefiles Currently Loaded.

Additional info:

Though I'm aware that modulefiles should be present in standard directories, this should imho work too.
Comment 1 Orion Poplawski 2009-09-23 11:05:14 EDT
This works (at least with 3.2.7b):

[orion@orca devel]$ module load /usr/share/mpich2/mpich2-32
[orion@orca devel]$ module list
Currently Loaded Modulefiles:
  1) /usr/share/mpich2/mpich2-32
[orion@orca devel]$ module unload mpich2-32
[orion@orca devel]$ module list
No Modulefiles Currently Loaded.

How's that?
Comment 2 Milos Jakubicek 2009-09-23 13:27:12 EDT
Ah, it reveals that this is not a bug, I pointed to the modulefile via an absolute path when unloading (like when loading it), which doesn't work, one has to pass just the filename as argument as you did.

However, the "module unload <name>" command returns 0 whatever nonsense is passed as <name>, which is not good (it should print an error).

There is another issue with the update to 3.2.7b, namely that the path to modulecmd in /etc/profile.d/modules.sh is now wrong (commented on the update).
Comment 3 Orion Poplawski 2009-09-23 17:12:22 EDT
(In reply to comment #2)
> However, the "module unload <name>" command returns 0 whatever nonsense is
> passed as <name>, which is not good (it should print an error).

True, but this should be filed upstream.
 
> There is another issue with the update to 3.2.7b, namely that the path to
> modulecmd in /etc/profile.d/modules.sh is now wrong (commented on the update).  

Yes, fixed in 3.2.7b-2.  Thanks.
Comment 4 Milos Jakubicek 2009-09-24 02:07:05 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > However, the "module unload <name>" command returns 0 whatever nonsense is
> > passed as <name>, which is not good (it should print an error).
> 
> True, but this should be filed upstream.

Just FYI, I found this already file as:

https://sourceforge.net/tracker/?func=detail&aid=2384340&group_id=15538&atid=115538

...commented on the bug.

Note You need to log in before you can comment on or make changes to this bug.