All,
For reasons I won’t go into, we find we need to change the POSIX group names for all of our users. My understanding is that in the absence of an --account option, sbatch/salloc assumes the account is the user’s primary POSIX group.
So, to change group names, we’ll need to change the account names on all the associations in sacctmgr. And ideally, we would change account names in accounting records so we don’t lose accounting history.
One is tempted to get into the Slurm DB and start running SQL updates. Is that path too fraught with peril to consider? Or should I just recreate the associations with the new names and take my lumps on the accounting history?
John
"Burian, John via slurm-users" slurm-users@lists.schedmd.com writes:
My understanding is that in the absence of an --account option, sbatch/salloc assumes the account is the user’s primary POSIX group.
Are you sure about that? I've never heard of such defaulting. My understanding is that without --account, sbatch/salloc will use what has been set as the user's DefaultAccount in Slurmdbd. That can be set explicitly with sacctmgr first time a user is created, but failing that, the account of the first user-account association of the user will be used as DefaultAccount.
We are using slurm 24.05.5, and on that and previous versions when you do sbatch and do not explicitly provide --account, it will use the defaultAccount field in the sacctmgr database.
Our Unix group and Slurm allocation names are not the same (groups have a two letter cluster name prefix, and allocations get a suffix indicating the source of the funding, and many users belong to multiple allocations with the same group). But you can test it; in particular, if you do "sacctmgr show user USERNAME" where USERNAME is some user on your system, it should list something like:
sacctmgr show user payerle User Def Acct Admin ---------- ---------- --------- payerle test-paid None
In this case, my default account is test-paid, and that will be used if I do not explicitly specify an account when submitting a job. (And we do not have a test-paid Unix group, and the closest unix group I belong to is zt-test).
Actually, the behavior you describe with the groups is new to me (although Google's AI also suggested something similar); I cannot find much in the docs to support either your or my description of Slurm behavior. All I know is that is how our Slurm behaves, and it has behaved that way in the ~10 years we have been using it. It is possible the behavior is dependent upon other configuration settings in Slurm (Slurm is like that),
However, in https://slurm.schedmd.com/sacctmgr.html, under Specifications for Users, it described the DefaultAccount field <quote> *DefaultAccount*=<*account*> https://slurm.schedmd.com/sacctmgr.html#OPT_DefaultAccountIdentify the default bank account name to be used for a job if none is specified at submission time. </quote>
I suggest you test it out; create a new account + group and user in the account; verify expected account defaulting when using sbatch, examine the defaultaccount for the user (sacctmgr show user), then change the name of the group w/out changing the defaultaccount and verify account defaulting works as expected.
On Thu, Jun 5, 2025 at 3:42 AM Bjørn-Helge Mevik via slurm-users < slurm-users@lists.schedmd.com> wrote:
"Burian, John via slurm-users" slurm-users@lists.schedmd.com writes:
My understanding is that in the absence of an --account option, sbatch/salloc assumes the account is the user’s primary POSIX group.
Are you sure about that? I've never heard of such defaulting. My understanding is that without --account, sbatch/salloc will use what has been set as the user's DefaultAccount in Slurmdbd. That can be set explicitly with sacctmgr first time a user is created, but failing that, the account of the first user-account association of the user will be used as DefaultAccount.
-- B/H
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com
As evidenced by numerous responses, my understanding was incorrect. Thanks all for setting me straight, saved me quite a bit of trouble.
John
From: Thomas M. Payerle via slurm-users slurm-users@lists.schedmd.com Date: Thursday, June 5, 2025 at 9:40 AM To: Bjørn-Helge Mevik b.h.mevik@usit.uio.no, slurm-users@schedmd.com slurm-users@schedmd.com Subject: [slurm-users] Re: Changing account names in sacctmgr We are using slurm 24. 05. 5, and on that and previous versions when you do sbatch and do not explicitly provide --account, it will use the defaultAccount field in the sacctmgr database. Our Unix group and Slurm allocation names are not the same ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. Search “email warning banner” on ANCHOR for more information https://us-phishalarm-ewt.proofpoint.com/EWT/v1/NiUAmZJ8c1GNWg!ZvBtiKkPrzNknnq-a6DD4Gi8i6pN7jSVxMHKp5XP5Cq6C6JKH8vjQ3HbXVmzO6u0Z3GcmBlVPlFeYycYshvEaxYP1-ZPyycrCnOoJuFj_QD0eFMCA6Y6xrq1PFjLcjIERCRDhSs$ Report Suspicious https://us-phishalarm-ewt.proofpoint.com/EWT/v1/NiUAmZJ8c1GNWg!ZvBtiKkPrzNknnq-a6DD4Gi8i6pN7jSVxMHKp5XP5Cq6C6JKH8vjQ3HbXVmzO6u0Z3GcmBlVPlFeYycYshvEaxYP1-ZPyycrCnOoJuFj_QD0eFMCA6Y6xrq1PFjLcjIERCRDhSs$
ZjQcmQRYFpfptBannerEnd We are using slurm 24.05.5, and on that and previous versions when you do sbatch and do not explicitly provide --account, it will use the defaultAccount field in the sacctmgr database. Our Unix group and Slurm allocation names are not the same (groups have a two letter cluster name prefix, and allocations get a suffix indicating the source of the funding, and many users belong to multiple allocations with the same group). But you can test it; in particular, if you do "sacctmgr show user USERNAME" where USERNAME is some user on your system, it should list something like:
sacctmgr show user payerle User Def Acct Admin ---------- ---------- --------- payerle test-paid None In this case, my default account is test-paid, and that will be used if I do not explicitly specify an account when submitting a job. (And we do not have a test-paid Unix group, and the closest unix group I belong to is zt-test). Actually, the behavior you describe with the groups is new to me (although Google's AI also suggested something similar); I cannot find much in the docs to support either your or my description of Slurm behavior. All I know is that is how our Slurm behaves, and it has behaved that way in the ~10 years we have been using it. It is possible the behavior is dependent upon other configuration settings in Slurm (Slurm is like that), However, in https://slurm.schedmd.com/sacctmgr.htmlhttps://urldefense.com/v3/__https:/slurm.schedmd.com/sacctmgr.html__;!!NiUAmZJ8c1GNWg!TeNLvuwMzxb0WWctSifTwrvgKXB0OprW1-kFqL8wmG0N3vPmXNemkq-We3Qq-Q7kwb7bX5Kl6_cMAS8LSblH8z7GdYkdPE_3zMwBq88$, under Specifications for Users, it described the DefaultAccount field <quote> DefaultAccount=<account> Identify the default bank account name to be used for a job if none is specified at submission time. </quote> I suggest you test it out; create a new account + group and user in the account; verify expected account defaulting when using sbatch, examine the defaultaccount for the user (sacctmgr show user), then change the name of the group w/out changing the defaultaccount and verify account defaulting works as expected.
On Thu, Jun 5, 2025 at 3:42 AM Bjørn-Helge Mevik via slurm-users <slurm-users@lists.schedmd.commailto:slurm-users@lists.schedmd.com> wrote: "Burian, John via slurm-users" <slurm-users@lists.schedmd.commailto:slurm-users@lists.schedmd.com> writes:
My understanding is that in the absence of an --account option, sbatch/salloc assumes the account is the user’s primary POSIX group.
Are you sure about that? I've never heard of such defaulting. My understanding is that without --account, sbatch/salloc will use what has been set as the user's DefaultAccount in Slurmdbd. That can be set explicitly with sacctmgr first time a user is created, but failing that, the account of the first user-account association of the user will be used as DefaultAccount.
-- B/H
-- slurm-users mailing list -- slurm-users@lists.schedmd.commailto:slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.commailto:slurm-users-leave@lists.schedmd.com
-- Tom Payerle DIT-ACIGS/Mid-Atlantic Crossroads payerle@umd.edumailto:payerle@umd.edu 5825 University Research Park (301) 405-6135 University of Maryland College Park, MD 20740-3831
Regardless of the reason, if I had to modify anything like that in the db, I wouldn’t go the SQL route.
I would sacctmgr dump to a file. Modify the file, and sacctmgr load the file. Let the slurmdbd handle the SQL stuff.
While I’m at it, I’d do it in a git, for good accounting.
But as stated - it might not be necessary at all. Just my 2 cents.
Sent from my iPhone
On 4 Jun 2025, at 17:11, Burian, John via slurm-users slurm-users@lists.schedmd.com wrote:
All,
For reasons I won’t go into, we find we need to change the POSIX group names for all of our users. My understanding is that in the absence of an --account option, sbatch/salloc assumes the account is the user’s primary POSIX group.
So, to change group names, we’ll need to change the account names on all the associations in sacctmgr. And ideally, we would change account names in accounting records so we don’t lose accounting history.
One is tempted to get into the Slurm DB and start running SQL updates. Is that path too fraught with peril to consider? Or should I just recreate the associations with the new names and take my lumps on the accounting history?
John
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com