Ticket 9583

Summary: sacctmgr load does not respect PreserveCaseUser
Product: Slurm Reporter: Matt Ezell <ezellma>
Component: AccountingAssignee: Chad Vizino <chad>
Status: RESOLVED FIXED QA Contact:
Severity: 3 - Medium Impact    
Priority: ---    
Version: 20.02.4   
Hardware: Linux   
OS: Linux   
Site: NOAA 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: ORNL 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
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Matt Ezell 2020-08-12 19:47:44 MDT
User accounts loaded with `sacctmgr load` are loaded as lowercase, even when PreserveCaseUser is set.

[root@t4-slurm-backup slurm]# grep Preserve /etc/slurm/slurmdbd.conf 
Parameters=PreserveCaseUser
[root@t4-slurm-backup slurm]# grep Matthew.Ezell t4.cfg 
User - 'Matthew.Ezell':DefaultAccount='ornlstf':AdminLevel='Administrator':Fairshare=2147483647
User - 'Matthew.Ezell':DefaultAccount='ornlstf':AdminLevel='Administrator':Fairshare=2147483647
[root@t4-slurm-backup slurm]# sacctmgr load t4.cfg clean
...lots of lines of output of the "changes"
sacctmgr: Done adding cluster in usec=1320032
Would you like to commit changes? (You have 30 seconds to decide)
(N/y): y
[root@t4-slurm-backup slurm]# sacctmgr show user Matthew.Ezell
      User   Def Acct     Admin 
---------- ---------- --------- 
matthew.e+    ornlstf Administ+
Comment 1 Chad Vizino 2020-08-13 10:43:12 MDT
I will look into this.
Comment 2 Chad Vizino 2020-08-13 16:58:28 MDT
Bug 5813 seems to address this. However, I think that the "sacctmgr load" use case you show was overlooked--I was able to reproduce your results.

As a workaround for now, you should be able to correct the case by doing this for a user:

>sacctmgr mod user matthew.ezell set newname=Matthew.Ezell
This is kind of a pain if you have lots of users. I'll look into fixing the code.
Comment 16 Chad Vizino 2020-09-28 09:09:52 MDT
Hi Matt,

A fix for this has been checked in and is going into 20.02.6.