-
Notifications
You must be signed in to change notification settings - Fork 119
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
slurm_job_batch_script can't return string #250
Comments
Hi @Autumn-Roy in the current implementation, indeed a slurm function is used that simply outputs the script to stdout and just returns the error-code of that function (0 or -1). Of course, the script should actually just be returned as a string - which isn't possible right now. Whenever I find the time, I can go ahead and implement it though. |
Hi @Autumn-Roy I implemented the functionality to get the script as a string. |
Hi, @tazend |
@tazend |
Hi @Autumn-Roy mh, that is weird - I can unfortunately not replicate this error on my side.
I have pushed a change to this branch, so you should now see the exact error message and error code after rebuilding pyslurm with this. |
Hi @tazend I can‘t get the logs of slurmctld. Then I try to use |
Hi @Autumn-Roy I tested it again on another cluster - but wasn't able to replicate the error you get.
If not yet tried, could you create a seperate python virtual environment to install pyslurm? Like this:
When it builds, it shows you the detected slurm version, and most importantly the directory to the slurm shared lib that pyslurm links to (for example /usr/lib64). If pyslurm finds the lib in /usr/lib64 for example and scontrol shows /usr/lib64/slurm, then everything should be fine. |
Hi @tazend I tried the way you metioned. But the same error occured. Temporarily, I use |
do other functions like:
work though? |
Hi @Autumn-Roy I was now able to track down the cause of this error. The reason for this is that in 21.08.8 a critical CVE was fixed regarding credential abuse by a potential malicious actor. I have created this branch for now which reverts to the struct definitions pre-CVE release and it should work now for you. For the main 21.08 branch however the original code which only works on releases post-cve will be backported. Ideally, your cluster administrators should update to the latest patch for 21.08 (to also fix the potential security issues) |
Hi @tazend |
Details
Issue
When I try to get the batch_script by job().slurm_job_batch_script(jobid), it only returns 0 or -1, and print the scripts one the screen. But in the doc, a str will return here.
So, any problem on my usage? Or, can I get the script by other way?
The text was updated successfully, but these errors were encountered: