You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building a service with pyslurm to submit job, I need to run the service with admin privilege so that it could submit as different user. Anyway to slurm_kill_job with user_id as submit so that slurm knows which user is trying to kill job and only admin user could kill other users's job.
The text was updated successfully, but these errors were encountered:
I'm not sure if I understand correctly here. So you have a service that runs with admin privileges, and you submit jobs for other users. Right now it sounds like that all of your jobs are running with the "admin" user, but you want a way so slurm knows which of those jobs are tied to a specific user, so they can kill their own jobs. This setup will not really work out I believe.
If you really want to submit jobs for other users, you should submit the job with the users UID and GID, like described here in my comment: #351 (comment)
This way, the job is already launched with the User credentials, and the User can easily kill their own jobs. Since this requires root permission, and if you don't want to run your entire service with root, you might need to put the job-submission logic into a seperate script and give your service-user sudo permissions to execute it.
Within this script, you can then for example submit the job with the specific UID of the user. Or, instead of providing the UID/GID with the job-submit description, you can drop your privileges to the User and submit the job like usual.
Details
Slurm Version: 21.08.5
Python Version: 3.9.20
Cython Version: 3.0.11
PySlurm Branch: v21.08.4
Linux Distribution:Ubuntu 22.04.3 LTS
Issue
I am building a service with pyslurm to submit job, I need to run the service with admin privilege so that it could submit as different user. Anyway to slurm_kill_job with user_id as submit so that slurm knows which user is trying to kill job and only admin user could kill other users's job.
The text was updated successfully, but these errors were encountered: