Ticket 13828

Summary: deleting an account member removes usage
Product: Slurm Reporter: Todd Merritt <tmerritt>
Component: AccountingAssignee: Scott Hilton <scott>
Status: RESOLVED FIXED QA Contact:
Severity: 4 - Minor Issue    
Priority: ---    
Version: 21.08.5   
Hardware: Linux   
OS: Linux   
Site: U of AZ 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: 22.05.0pre1
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Todd Merritt 2022-04-12 13:36:28 MDT
I recently discovered that when you delete an account member, it deletes their consumption/fair share for the current billing period

sshare --parsable2 --noheader --format Account,User,GrpTRESMins,GrpTRESRaw,TRESRunMins
...
  parent_49||cpu=4560600|cpu=486884,mem=2615897372,energy=0,node=5121,billing=486884,fs/disk=0,vmem=0,pages=0,gres
/gpu:volta=0|cpu=0,mem=0,energy=0,node=0,billing=0,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0
 tmerritt|||cpu=485923,mem=2610976711,energy=0,node=5061,billing=485923,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0|cpu=0,mem=0,energy=0,node=0,billing=0,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0
   toddtest|||cpu=961,mem=4920661,energy=0,node=60,billing=961,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0|cpu=0,mem=0,energy=0,node=0,billing=0,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0
    

Then if I delete the user and re-add them, and run the same command again I see

  parent_49||cpu=4560600|cpu=485923,mem=2610976711,energy=0,node=5061,billing=485923,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0|cpu=0,mem=0,energy=0,node=0,billing=0,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0
   tmerritt|||cpu=485923,mem=2610976711,energy=0,node=5061,billing=485923,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0|cpu=0,mem=0,energy=0,node=0,billing=0,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0 
   toddtest|||cpu=0,mem=0,energy=0,node=0,billing=0,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0|cpu=0,mem=0,energy=0,node=0,billing=0,fs/disk=0,vmem=0,pages=0,gres/gpu:volta=0
Comment 1 Scott Hilton 2022-04-12 16:02:41 MDT
Todd,

This makes sense to me. Is this an issue?

-Scott
Comment 2 Todd Merritt 2022-04-13 07:31:50 MDT
Hi Scott,

I'd respectfully disagree. If the account has used the resource, if does not make sense to me that they should be able to un-charge themselves for historical usage. It's a huge issue for us because we allow users to manage their own research groups through a self service web portal. Users being users, once they discover this, they can just remove a user from their group after chewing through their monthly time allocation. Then, re-add them to the group and get their entire allocation back giving them unlimited time each month.

Thanks,
Todd
Comment 3 Scott Hilton 2022-04-13 09:52:55 MDT
Todd,

Thanks for explaining the issue. I see the ability to game the system and will look into a way to fix this.

However, I recommend sreport and sacct for viewing historical usage and billing users. sshare was designed with fairshare in mind not record keeping.

-Scott
Comment 4 Todd Merritt 2022-04-13 09:57:11 MDT
Thanks, Scott! We do use sacct for reporting historical usage. I'll take a look at sreport as well.
Comment 9 Scott Hilton 2022-05-09 16:22:28 MDT
Todd,

This is fixed in 22.05. (See commit 604aefef72)

With this change an assoc that is deleted will add their usage to their parent assoc.

If a user is removed from an account, the account usage won't change. If the user is re-added the user's usage will have been cleared, but the account will still stay the same.

-Scott
Comment 10 Todd Merritt 2022-05-10 07:14:47 MDT
Sounds great, thanks!
Comment 11 Scott Hilton 2022-05-10 08:36:09 MDT
Closing ticket