From 66d24a0278e1fcd84c2b48c4aed0309715a6c9fe Mon Sep 17 00:00:00 2001 From: Ravi Tripathi <ravi89@uab.edu> Date: Tue, 11 Feb 2020 22:20:47 +0000 Subject: [PATCH] Adding user to slurm as well --- slurm_agent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/slurm_agent.py b/slurm_agent.py index ab7dcec..5ce3727 100755 --- a/slurm_agent.py +++ b/slurm_agent.py @@ -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") -- GitLab