-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(slurm_ops): implement initial jwt key manager #34
Conversation
Add initial support for managing jwt keys with the slurm_ops charm library. Currently relies on the cryptography library for generating an RSA key that is used to sign Slurm communications, but we'll eventually be made to rely on a dedicated `jwtctl` tool that can handle the key for us. Signed-off-by: Jason C. Nucciarone <[email protected]>
Signed-off-by: Jason C. Nucciarone <[email protected]>
Works on my machine 💀 Edit: Seems to be an issue with Python 3.10 😮💨 |
…path` Signed-off-by: Jason C. Nucciarone <[email protected]>
c9221fe
to
704777d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Some small comments
…e data directory Signed-off-by: Jason C. Nucciarone <[email protected]>
Follows style recommended in the Google Python styleguide. Signed-off-by: Jason C. Nucciarone <[email protected]>
@jedel1043 R4R I created issues to help track the work mentioned in the TODO comments such as switch to the Slurm snap stable channel and creating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really nice! I have a small nitpick that doesn't block merging this as it is.
…tructor Signed-off-by: Jason C. Nucciarone <[email protected]>
@jedel1043 one more review to make sure we like the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfect!
This PR introduces initial support for managing JWT keys within
slurm_ops
. It's similar to the_MungeKeyManager
class, but with the exception that it uses thecryptography
module to generate the key rather than a dedicated tool. Ideally we'll eventually use a dedicated tool - something likejwtctl
- but that's for next cycle.Also, this PR makes the small change of generating a
StateSaveLocation
directory for Slurm. The Debian package doesn't do this, so after install the_AptManager
will create thevar/lib/slurm/slurm.state
directory that can be used for stashing the key and then exporting across the cluster. There doesn't seem to be an agreed upon standard, so I just chose the dirnameslurm.state
since it's clear that this is the directory where the slurm daemons will save their state. The snap usescheckpoint
as the name, but we can easily change this.Closes #10