Ticket 10032

Summary: sacctmgr will allow removal of default account without warning
Product: Slurm Reporter: Kaylea Nelson <kaylea.nelson>
Component: AccountingAssignee: Scott Hilton <scott>
Status: RESOLVED FIXED QA Contact:
Severity: 4 - Minor Issue    
Priority: --- CC: albert.gil
Version: 20.02.3   
Hardware: Linux   
OS: Linux   
See Also: https://bugs.schedmd.com/show_bug.cgi?id=8452
https://bugs.schedmd.com/show_bug.cgi?id=9903
Site: Yale Slinky Site: ---
Alineos Sites: --- Atos/Eviden Sites: ---
Confidential Site: --- Coreweave sites: ---
Cray Sites: --- DS9 clusters: ---
Google sites: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- NoveTech Sites: ---
Nvidia HWinf-CS Sites: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Tzag Elita Sites: ---
Linux Distro: --- Machine Name:
CLE Version: Version Fixed: 20.02.6 20.11.0pre1
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Kaylea Nelson 2020-10-21 08:22:13 MDT
After upgrading to 20.02.3, sacctmgr will let us remove an account from a user even though it is the default account with no warning. In version 19, we would receive the following warning and the change would be rejected:

 User <user> on cluster <cluster> no longer has a default account.
 You must change the default account of these users or remove the users completely from the affected clusters to allow these changes.
 Changes Discarded

Now the same operation goes through and the user is left with "null" default account and can't submit jobs (without using the -A flag).

Steps to reproduce:

1. Have a userA in groupA and groupA is their default account
2. sacctmgr add user name=userA account=groupB
3. sacctmgr remove user name=userA account=groupA
4. "sacctmgr show user -s userA" shows nothing in the Def Acct column and userA can receives the following warning on submitting jobs (without -A):

srun: error: Unable to allocate resources: Invalid account or account/partition combination specified
Comment 2 Scott Hilton 2020-10-21 17:05:50 MDT
Kaylea,

Thanks for pointing this out. I found the source of the bug and am working on a fix. It should probably be in the 20.02.6 release.

-Scott
Comment 7 Scott Hilton 2020-10-22 14:22:38 MDT
Kaylea,

The fix is up. The commit id is: 1ee6745bb0463b9e908753551f5f2dae3e94b468

Thanks for bringing this to our attention.

-Scott