Ticket 12025

Summary: RawUsage not updating for users with mixed-case usernames
Product: Slurm Reporter: Jeff Salveter-Taylor <jeffrey.salveter-taylor>
Component: SchedulingAssignee: Scott Hilton <scott>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 3 - Medium Impact    
Priority: ---    
Version: 20.11.2   
Hardware: Linux   
OS: Linux   
Site: InterDigital Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---
Attachments: slurm.conf
slurmdbd.conf
Output of 'sacct -u Senay.Negusse --format=user,uid,jobid,state,CPUTimeRAW'

Description Jeff Salveter-Taylor 2021-07-13 15:31:59 MDT
Most of our users have all lowercase usernames, e.g. john.smith. Some users have mixed-case usernames, e.g. John.Smith. For the mixed-case users, when they submit jobs, their RawUsage remains at 0 in the output of 'sshare -a -l'. I created a test mixed-case user and confirmed this. The all lowercase users have the correct RawUsage.

The following bug appears to confirm the mixed-case issue:

https://bugs.schedmd.com/show_bug.cgi?id=1554

See comments 15 to 18. However, this bug is 6 years old, and it isn't clear if mixed-case support has been added since then. Please advise.
Comment 1 Jeff Salveter-Taylor 2021-07-14 13:55:40 MDT
Any updates?
Comment 2 Scott Hilton 2021-07-14 16:43:02 MDT
Jeff,

Can I get your slurm.conf and sshare output for the affected user(s).

-Scott
Comment 3 Jeff Salveter-Taylor 2021-07-14 16:55:59 MDT
Created attachment 20376 [details]
slurm.conf
Comment 4 Jeff Salveter-Taylor 2021-07-14 17:00:54 MDT
User Senay.Negusse has run thousands of jobs today, his RawUsage should not be 0.

sshare -u Senay.Negusse

             Account       User  RawShares  NormShares    RawUsage  EffectvUsage  FairShare
-------------------- ---------- ---------- ----------- ----------- ------------- ----------
root                                          0.000000     3762485      1.000000
 allusers                            10000    0.999900     3762485      1.000000
  allusers           senay.neg+        100    0.028571           0      0.000000   0.972222
Comment 5 Scott Hilton 2021-07-15 13:38:23 MDT
Jeff,

Can I also get your slurmdbd.conf

-Scott
Comment 6 Jeff Salveter-Taylor 2021-07-15 13:40:40 MDT
Created attachment 20393 [details]
slurmdbd.conf

Attaching slurmdbd.conf
Comment 7 Scott Hilton 2021-07-15 14:04:06 MDT
Jeff,

Can I also get the output of:
>sacctmgr show assoc where user=Senay.Negusse
>sacctmgr show assoc where user=senay.negusse

-Scott
Comment 8 Jeff Salveter-Taylor 2021-07-15 14:08:22 MDT
sacctmgr show assoc where user=Senay.Negusse

   Cluster    Account       User  Partition     Share   Priority GrpJobs       GrpTRES GrpSubmit     GrpWall   GrpTRESMins MaxJobs       MaxTRES MaxTRESPerNode MaxSubmit     MaxWall   MaxTRESMins                  QOS   Def QOS GrpTRESRunMin 
---------- ---------- ---------- ---------- --------- ---------- ------- ------------- --------- ----------- ------------- ------- ------------- -------------- --------- ----------- ------------- -------------------- --------- ------------- 
   kopgrid   allusers senay.neg+                  100                                                                                                                                                             normal



sacctmgr show assoc where user=senay.negusse

   Cluster    Account       User  Partition     Share   Priority GrpJobs       GrpTRES GrpSubmit     GrpWall   GrpTRESMins MaxJobs       MaxTRES MaxTRESPerNode MaxSubmit     MaxWall   MaxTRESMins                  QOS   Def QOS GrpTRESRunMin 
---------- ---------- ---------- ---------- --------- ---------- ------- ------------- --------- ----------- ------------- ------- ------------- -------------- --------- ----------- ------------- -------------------- --------- ------------- 
   kopgrid   allusers senay.neg+                  100                                                                                                                                                             normal
Comment 9 Scott Hilton 2021-07-15 14:09:49 MDT
And a couple jobs from the output of

>sacct -u Senay.Negusse --format=user,jobid,state,CPUTimeRAW
>sacct -u senay.negusse --format=user,jobid,state,CPUTimeRAW
Comment 10 Scott Hilton 2021-07-15 14:11:41 MDT
Also show the uid
>sacct -u Senay.Negusse --format=user,uid,jobid,state,CPUTimeRAW
>sacct -u senay.negusse --format=user,uid,jobid,state,CPUTimeRAW
Comment 11 Jeff Salveter-Taylor 2021-07-15 14:14:59 MDT
Created attachment 20394 [details]
Output of 'sacct -u Senay.Negusse --format=user,uid,jobid,state,CPUTimeRAW'

Output of 'sacct -u Senay.Negusse --format=user,uid,jobid,state,CPUTimeRAW'
Comment 12 Jeff Salveter-Taylor 2021-07-15 14:15:37 MDT
sacct -u senay.negusse --format=user,uid,jobid,state,CPUTimeRAW

sacct: error: Invalid user id: senay.negusse
Comment 13 Scott Hilton 2021-07-15 14:45:25 MDT
Jeff,

Ok, I understand what is going on. sshare is looking for senay.negusse but all the jobs have Senay.Negusse. Thus you get rawusage=0.

The short answer is you need the correct case version of the username in slurm. You do this by adding this line to your slurmbdb.conf.
>Parameters=PreserveCaseUser

Afterwards you can update the user to the correct upper case version in slurm accounting.
>sacctmgr update user senay.negusse set newname=Senay.Negusse

-Scott
Comment 14 Jeff Salveter-Taylor 2021-07-19 07:40:08 MDT
Thanks Scott, that fixed the problem. Mixed-case usernames now incur the proper RawUsage. Please close this bug.
Comment 15 Scott Hilton 2021-07-19 10:44:53 MDT
Closing Bug