Skip to content

Silent purge fails when super-sticky module prerequisite isn't super-sticky #582

Description

@adrien-cotte

Problem description

I'm facing an issue regarding module purging when using super-sticky modules with non-sticky prereqs.

Summary of my use case:

  • workspace and default_workspace are virtual modules.
  • I can load multiple workspace/<group> modules simultaneously (e.g., workspace/enterprise, workspace/partner).
  • Only one default_workspace module can be loaded at a time, corresponding directly to a specific workspace/<group> module (e.g., default_workspace/enterprise, default_workspace/partner).
  • The related workspace module is a prerequisite (prereq) for its corresponding default_workspace module.
  • default_workspace modules have the super-sticky tag.
  • To avoid error messages during module purging, I configured: module config sticky_purge silent.

Examples in pseudo-bash:

$ module load workspace/partner
$ module load workspace/enterprise
$ module switch default_workspace/partner default_workspace/enterprise
$ module list -t
1) workspace/partner
2) workspace/enterprise
3) default_workspace/enterprise (super-sticky)
$ module purge
$ module list
1) workspace/enterprise
2) default_workspace/enterprise (super-sticky)

Current behavior

When purging my modules (module purge), I receive an error for the workspace module corresponding to the loaded default_workspace module, since the workspace module itself isn't marked as super-sticky:

$ module load default_workspace/partner
$ module purge
Unloading workspace/partner
    ERROR: Dependent default_workspace/partner is loaded

Expected behavior

When purging my modules with the configuration module config sticky_purge silent, I expect no error messages, even if a non-super-sticky module (workspace) is a prerequisite for a super-sticky module (default_workspace).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions