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

fix: do not preseed slurm and slurmdbd configuration files #41

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

NucciTheBoss
Copy link
Member

This pull request removes preseeding an empty slurm.conf and slurmdbd.conf configuration file in the install hook. The slurm.conf file, specifically, would conflict with the slurm.conf file fetched from the Slurm controller slurmctld. This caused issues if attempting to use slurm CLI commands as they would try to read the preseeded configuration file instead of the slurm.conf file under conf-cache.

The configuration hooks now use the context manager provided by slurmutils to create the files on demand the first time their respective configuration hook is invoked.

Fixes #27

Misc.

  • Add pyfakefs as test dependency. Context manager don't like being mocked, so I just created a fake file within the virtual filesystem instead 😅

- No longer create empty slurm.conf file at installation. Instead
  the context manager will create an empty `SlurmConfig` object
  and make the new file the first time the admin sets a config value.

Signed-off-by: Jason C. Nucciarone <[email protected]>
@NucciTheBoss NucciTheBoss requested a review from jedel1043 July 16, 2024 22:00
@NucciTheBoss NucciTheBoss added the bug Something isn't working label Jul 16, 2024
Signed-off-by: Jason C. Nucciarone <[email protected]>
Copy link
Contributor

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@NucciTheBoss NucciTheBoss merged commit de68a1e into charmed-hpc:main Jul 16, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

[Bug]: Preseeded slurm.conf conflicts with slurm.conf retrieved from controller when in configless mode
2 participants