Skip to content
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

Hardcoded PREFIX in Slurm and Munge builds generate invalid paths #11

Closed
jedel1043 opened this issue Jun 6, 2024 · 6 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@jedel1043
Copy link
Contributor

Setting prefix=/ at build time for Slurm generates incorrect paths that are baked at build time by Slurm. Examples:

image

image

Setting both LibPrefix and AuthInfo serves as a workaround, but it would be good to see if we can patch this to have correct default values.

@jedel1043 jedel1043 changed the title Hardcoded PREFIX in Slurm build generate invalid paths Hardcoded PREFIX in Slurm build generates invalid paths Jun 7, 2024
@NucciTheBoss NucciTheBoss self-assigned this Jun 7, 2024
@NucciTheBoss
Copy link
Member

Unfortunately this is a limitation with the autotools plugin that I have run up against multiple times, especially when working with C-based code bases like Apache httpd and nginx. Many programs will bake the prefix into the source code during configuration and use those as the default paths if there's no additional configuration.

For example, if I didn't set the prefix, Slurm would likely bake in the path /root/parts/slurm/install/lib/slurm. httpd does something similar in the Ondemand snap, but I fix it by using a wrapper to point directly to the paths I want it to find. I see us having two possible solutions here:

  1. Set the munged socket path and plugin path at configure time. Slurm has quite a few configure options. I do something like this for nginx.
  2. During snap installation, auto-generate a slurm.conf file that sets the socket and plugin path to the correct locations. We can just do this in the install hook. I do something like this with the Ondemand snap.

Best bet is to probably first start with option 1 and then try option 2 if those configuration options are not available with the configure script.

@jedel1043 jedel1043 changed the title Hardcoded PREFIX in Slurm build generates invalid paths Hardcoded PREFIX in Slurm and Munge builds generate invalid paths Jun 7, 2024
@jedel1043
Copy link
Contributor Author

Found another one
image

@NucciTheBoss
Copy link
Member

The mungekey issue will be fixed in #14 by including a wrapper (or configure change) to point to the correct directory.

Regarding the Slurm location issues, I did not find an option that enables me to set specific values at configure time before building Slurm. Easiest fix here is to just autogenerate those slurm.conf options in the install hook, and then have some complimenting documentation that indicates why we generate those options automatically and why you're strongly discouraged from changing them.

@NucciTheBoss
Copy link
Member

#18 slightly addresses this issue specifically with the munge key location and plugin dir, but there's still likely merits to automatically generating a basic slurm.conf file that includes info on how to configure munge. If a site isn't using configless mode, it would be good for us to already have set for where to look for the munged socket.

mungekey likely just requires a wrapper that points to the correct location.

@NucciTheBoss NucciTheBoss added the bug Something isn't working label Jun 11, 2024
@NucciTheBoss
Copy link
Member

Actually, we can tell Slurm where to look by default for the munged service socket by using the --with-munge-socket configure option when building Slurm.

@NucciTheBoss
Copy link
Member

This issue is fixed by #24 as Slurm is now able to find to the PluginDir and the munge key file without additional configuration - requires extra settings in the configure script - and we have a path forward for fixing the munge key command by fleshing out the configuration API for munge in #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants