Ticket 7545 - Is there a way to move all of a user's historical job data to a different account
Summary: Is there a way to move all of a user's historical job data to a different acc...
Status: RESOLVED INFOGIVEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Accounting (show other tickets)
Version: - Unsupported Older Versions
Hardware: Linux Linux
: 3 - Medium Impact
Assignee: Ben Roberts
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2019-08-09 09:28 MDT by Ryan Novosielski
Modified: 2019-09-05 14:31 MDT (History)
0 users

See Also:
Site: Rutgers
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: CentOS
Machine Name: perceval
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Ryan Novosielski 2019-08-09 09:28:48 MDT
There was a misunderstanding about account creation on one of our systems, and as a result, users were all placed into the same SLURM account. We'd like to move these users to the appropriate SLURM account, and if possible, migrate their historical usage (which we understand may not be possible).

So two questions:

1) What's the best way to change the user's account and make this transparent to them?
2) Is there any way to move all historical usage and associate it with their new/correct account?

Thanks.
Comment 2 Ben Roberts 2019-08-09 13:26:57 MDT
Hi Ryan,

The entity that is created for a user/account combination (and potentially partition as well) is called an association and each association is unique.  There isn't a good way in Slurm to move the usage from one association to another.  The way you would want to proceed is to create a new association for the correct user/account combination and begin tracking the utilization on that association.

I'll use an example to demonstrate the most transparent to move a user to a new accocunt.  I'll use user10 in my example.  This user currently has an association with an account called 'a1'.
$ sacctmgr show association user=user10 format=cluster,account,user
   Cluster    Account       User 
---------- ---------- ---------- 
   winston         a1     user10 


I'll create a new association for the user with the 'a2' account:
$ sacctmgr add user user10 account=a2


Now both associations show up for the user:
$ sacctmgr show association user=user10 format=cluster,account,user
   Cluster    Account       User 
---------- ---------- ---------- 
   winston         a1     user10 
   winston         a2     user10 


If you look at the user with sacctmgr you'll see that the default account is still the one they were originally created with.
$ sacctmgr show user user10
      User   Def Acct     Admin 
---------- ---------- --------- 
    user10         a1      None 


I'll change the default to the new account:
$ sacctmgr modify user where user=user10 cluster=winston set defaultaccount=a2


This change is reflected in sacctmgr:
$ sacctmgr show user user10      User   Def Acct     Admin 
---------- ---------- --------- 
    user10         a2      None 


Now when the user submits a job it will default to being in the 'a2' account.  At this point you could leave both associations so you can look at the usage from the first association or remove the old one.  The potential down side of leaving the old association is that the user could request the other account, which could affect your reporting if you don't expect them to be using it.  To show how to remove the first association I would do this:
$ sacctmgr remove user where user=user10 account=a1


I hope this helps.  Please let me know if you have any questions.

Thanks,
Ben
Comment 3 Ben Roberts 2019-08-22 09:01:21 MDT
Hi Ryan,

I wanted to follow up and make sure the information I sent makes sense.  Let me know if you have any questions about moving a user to a different account.

Thanks,
Ben
Comment 4 Ben Roberts 2019-09-05 14:31:26 MDT
Hi Ryan,

I believe the information I sent should have helped and I haven't heard a response in a while.  I'm going to close this ticket, but feel free to let me know if you have a follow up question.

Thanks,
Ben