[slurm-users] Adding an association to a different account

4 views
Skip to first unread message

Chip Seraphine

unread,
Dec 19, 2023, 4:45:49 PM12/19/23
to Slurm User Community List
TL,DR: How do you associate an existing user with a second account?

I have a user who has a default account, and I want to give them the ability to run jobs in a different account for billback purposes. My understanding is that this is what associations are for, but I can’t seem to figure out how to tie a user into a “secondary” account with an additional association. This question gets asked from time to time in online forums, but the answer that comes back is invariably to change the default account, which I expressly do not want to do.

I have something like this:
$ sacctmgr show assoc tree 'format=account%-33,user%-15,parentname%-15'
Account User ParentName
--------------------------------- --------------- ---------------
root
root root
gridadmins root
gridadmins cseraphine
gridadmins srv_gridops
test1 root
$ sacctmgr show user cseraphine format=User,DefaultAccount%30,Account%30
User Def Acct Account
---------- ------------------------------ ------------------------------
cseraphine gridadmins

User “cseraphine” has default account “gridadmins”. So far so good. Now I want to give cseraphine the ability to optionally charge jobs against “test1” without changing any default behavior (as with “srun -A test1 ….”). The sacctmgr man page tells me I cannot “create” an assoc, I must do it my modifying a user However:

$ sacctmgr modify user where user=cseraphine set account=test1
Unknown option: account=test1
Use keyword 'where' to modify condition

The “where” hint suggests that I am making a syntactical error and I’ve tried all the obvious permutations (modifying the account instead of the user, += instead of =, moving the clauses around etc), but without joy. Does anyone know how to do this?


--

Chip Seraphine
Grid Operations
For support please use help-grid in email or slack.
This e-mail and any attachments may contain information that is confidential and proprietary and otherwise protected from disclosure. If you are not the intended recipient of this e-mail, do not read, duplicate or redistribute it by any means. Please immediately delete it and any attachments and notify the sender that you have received it by mistake. Unintended recipients are prohibited from taking action on the basis of information in this e-mail or any attachments. The DRW Companies make no representations that this e-mail or any attachments are free of computer viruses or other defects.

Michael Gutteridge

unread,
Dec 19, 2023, 5:59:23 PM12/19/23
to Slurm User Community List
Ah, you are creating a *new* association:

sacctmgr create user cseraphine account=test1

HTH

 - Michael 

Chip Seraphine

unread,
Dec 20, 2023, 9:46:33 AM12/20/23
to Slurm User Community List
Thank you, I struggled with that. Very unintuitive to use “create user” on an existing user! I think I was actually looking at the answer a few times but assumed they were doing something else, given the syntax.

From: slurm-users <slurm-use...@lists.schedmd.com> on behalf of Michael Gutteridge <michael.g...@gmail.com>
Reply-To: Slurm User Community List <slurm...@lists.schedmd.com>
Date: Tuesday, December 19, 2023 at 4:59 PM
To: Slurm User Community List <slurm...@lists.schedmd.com>
Subject: [ext] Re: [slurm-users] Adding an association to a different account

Ah, you are creating a *new* association: sacctmgr create user cseraphine account=test1 HTH - Michael On Tue, Dec 19, 2023, 13: 47 Chip Seraphine <cseraphine@ drwholdings. com> wrote: TL,DR: How do you associate an existing user with a second

Ah, you are creating a *new* association:

sacctmgr create user cseraphine account=test1

HTH

- Michael

Reply all
Reply to author
Forward
0 new messages