Hello, Our developers are building some automation by using slurm's API and have the following questions: 1 - From the spec https://github.com/SchedMD/slurm/blob/slurm-20.02/src/slurmrestd/openapi.json In the following API to submit a job, script parameter is missing. Script parameter is needed to specify the command. POST /slurm/v0.0.35/job/submit Like it is shown in the preso https://slurm.schedmd.com/SLUG19/REST_API.pdf, $ cat demo ● POST /slurm/v1/job/submit HTTP/1.1 ● Accept: text/yaml ● Content-Type: application/json ● Content-Length: 348 ● {"job": {"account": "test", "ntasks": 20, "name": "test18.1", "nodes": [2, 4], "current_working_directory": "/tmp/", "user_id": 1000, "group_id": 1000, "environment": {"PATH": "/bin:/usr/bin/:/usr/local/bin/","LD_LIBRARY_PATH": "/lib/:/lib64/:/usr/local/lib"} }, "script": "#!/bin/bash\necho it works"} 2 - Regarding JWT based authentication. Will slurmrestd be able to verify the JWT signed by DKube? Or do we need a proxy infront of it which can use DKube as a JWKS verifier? Thanks, -Simran
Also, is there any documentation to enable and run slurmrestd? Thanks, -Simran
I just tried to build slurm 20.02.5 from source and did not get the slurmrestd binary. Is there some pre req's for slurmrestd that we will need to satisfy? Would be good to see documentation around installing/configuring slurmresd. Seems like there is some high level info on schedmd's site but nothing in too much detail, but I am might be missing something. Thanks, -Simran
(In reply to Simran from comment #0) > 1 - From the spec > https://github.com/SchedMD/slurm/blob/slurm-20.02/src/slurmrestd/openapi.json > In the following API to submit a job, script parameter is missing. Script > parameter is needed to specify the command. > POST > /slurm/v0.0.35/job/submit We will get that patched in for 20.02.6+. > 2 - Regarding JWT based authentication. Will slurmrestd be able to verify > the JWT signed by DKube? Or do we need a proxy infront of it which can use > DKube as a JWKS verifier? I'm unfamiliar with DKube but it should work as long as the correct fields are present and it is signed with the same key. Fields: > sun -> username > exp -> unix timestamp of expiration date (In reply to Simran from comment #1) > Also, is there any documentation to enable and run slurmrestd? The man page should have everything required to run it: > https://slurm.schedmd.com/slurmrestd.html If you have any questions after checking the man page, we can always append to it. (In reply to Simran from comment #2) > I just tried to build slurm 20.02.5 from source and did not get the > slurmrestd binary. Is there some pre req's for slurmrestd that we will need > to satisfy? Yes, under "Prerequisites": > https://slurm.schedmd.com/rest.html You may need to look at your config.log (or attach it) to see why it is not being built. > Would be good to see documentation around > installing/configuring slurmresd. Seems like there is some high level info > on schedmd's site but nothing in too much detail, but I am might be missing > something. In general, as long as the Prerequisites are found and "--disable-slurmrestd" is not specified, it should install along with all the other Slurm daemons. The config.log should error/warn when Prerequisites are not found per autotools. If the docs are still lacking, we will be happy to improve them with more details. Thanks, --Nate
(In reply to Nate Rini from comment #3) > (In reply to Simran from comment #0) > > 1 - From the spec > > https://github.com/SchedMD/slurm/blob/slurm-20.02/src/slurmrestd/openapi.json > > In the following API to submit a job, script parameter is missing. Script > > parameter is needed to specify the command. > > POST > > /slurm/v0.0.35/job/submit > We will get that patched in for 20.02.6+. Thanks Nate. When will 20.02.6+ be available with that patch? Does this mean that we can't use the api to submit a job using a script/command? > > > 2 - Regarding JWT based authentication. Will slurmrestd be able to verify > > the JWT signed by DKube? Or do we need a proxy infront of it which can use > > DKube as a JWKS verifier? > I'm unfamiliar with DKube but it should work as long as the correct fields > are present and it is signed with the same key. > > Fields: > > sun -> username > > exp -> unix timestamp of expiration date > > (In reply to Simran from comment #1) > > Also, is there any documentation to enable and run slurmrestd? > The man page should have everything required to run it: > > https://slurm.schedmd.com/slurmrestd.html > > If you have any questions after checking the man page, we can always append > to it. > > (In reply to Simran from comment #2) > > I just tried to build slurm 20.02.5 from source and did not get the > > slurmrestd binary. Is there some pre req's for slurmrestd that we will need > > to satisfy? > Yes, under "Prerequisites": > > https://slurm.schedmd.com/rest.html > > You may need to look at your config.log (or attach it) to see why it is not > being built. > > > Would be good to see documentation around > > installing/configuring slurmresd. Seems like there is some high level info > > on schedmd's site but nothing in too much detail, but I am might be missing > > something. > In general, as long as the Prerequisites are found and > "--disable-slurmrestd" is not specified, it should install along with all > the other Slurm daemons. The config.log should error/warn when Prerequisites > are not found per autotools. > > If the docs are still lacking, we will be happy to improve them with more > details. > > Thanks, > --Nate
(In reply to Simran from comment #4) > > We will get that patched in for 20.02.6+. > > When will 20.02.6+ be available with that patch? Current plan is sometime in October. Release times vary due to QA testing and having to correct regressions. > Does this mean that we can't use the api to submit a job using a script? The OpenAPI spec (OAS) provided is to make it easier for client and documentation generation. Job submission should work fine when the "script" field is in the job request, if not that is a different and more pressing issue then OAS being out of sync.
Created attachment 16218 [details] patch for 20.02
(In reply to Nate Rini from comment #5) > (In reply to Simran from comment #4) > > > We will get that patched in for 20.02.6+. > > > > When will 20.02.6+ be available with that patch? > Current plan is sometime in October. Release times vary due to QA testing > and having to correct regressions. 20.02.6 has been released but we missed the patch window. Please note that 20.11.0 has changes.
(In reply to Nate Rini from comment #11) > Please note that 20.11.0 has changes. Looks like that got sentence got cut off. 20.11.0 has the changes to add "script" for job submission in the OpenAPI specification.
After consulting internally, slurm-20.02 is being limited to only critical/security bug fixes and we suggest using slurm-20.11. If you have any more questions, please respond. Otherwise, I'm going to close this ticket.