Skip to content
Snippets Groups Projects
Commit 66d24a02 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Adding user to slurm as well

parent ed70a8ab
No related branches found
No related tags found
3 merge requests!23Feat resolve uid gid,!3Adding following agents,!4Test infra 1
......@@ -39,6 +39,7 @@ def slurm_account_create(ch, method, properties, body):
username = msg['username']
try:
subprocess.call(["sudo", "sacctmgr", "add", "account", username, "-i", "Descripition: Add user"])
subprocess.call(["sudo", "sacctmgr", "add", "user", username, "account="+username, "-i"])
print("SLURM account for user {} has been added".format(username))
except:
print("Failed to create user")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment