Summary: | Account renames - how to do it | ||
---|---|---|---|
Product: | Slurm | Reporter: | Josko Plazonic <plazonic> |
Component: | Database | Assignee: | Felip Moll <felip.moll> |
Status: | RESOLVED INFOGIVEN | QA Contact: | |
Severity: | 4 - Minor Issue | ||
Priority: | --- | CC: | felip.moll |
Version: | 20.11.x | ||
Hardware: | Linux | ||
OS: | Linux | ||
See Also: | https://bugs.schedmd.com/show_bug.cgi?id=6090 | ||
Site: | Princeton (PICSciE) | Alineos Sites: | --- |
Atos/Eviden Sites: | --- | Confidential Site: | --- |
Coreweave sites: | --- | Cray Sites: | --- |
DS9 clusters: | --- | 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: | ||
Target Release: | --- | DevPrio: | --- |
Emory-Cloud Sites: | --- |
Description
Josko Plazonic
2020-08-31 09:03:20 MDT
(In reply to Josko Plazonic from comment #0) > Good morning, > > we need to rename an account and we would prefer to actually rename rather > than create new and move users. As far as we can tell there is no way to do > it but it also does not seem to be too hard to do by hand. As in stop > slurmdbd and run a bunch of update commands. > > Do you have any recommendations/scripts/ways to do this? Or is this a NO, > DON'T DO IT? > > Thanks! Hi Josko, Unfortunately you cannot rename an account. The primary key of the account is the name and this field is used in all other database tables as a referral. You should modify the all the tables of Slurm database to reflect the change, which is quite complex and not supported at all. MariaDB [slurm_acct_db_2002]> desc acct_table; +---------------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+---------------------+------+-----+---------+-------+ | creation_time | bigint(20) unsigned | NO | | NULL | | | mod_time | bigint(20) unsigned | NO | | 0 | | | deleted | tinyint(4) | YES | | 0 | | | name | tinytext | NO | PRI | NULL | | | description | text | NO | | NULL | | | organization | text | NO | | NULL | | +---------------+---------------------+------+-----+---------+-------+ Then all jobs in ctld cache will also have been submitted with the old account name, which would be problematic. The sacctmgr command already denies this: ]$ sacctmgr modify account foo set name=bar Can't modify the name of an account Note also slurm.conf should be adapted, e.g. if using AllowAccounts (or similar) on a partition. Old accounting data would also be inconsistent. There's an enhancement request in place, but it is unlikely to be added in a near future due to the quantity of problems it can bring. See bug 6090. Your best option is to create a new account and add proper associations, modifying also DefAccount and Accounts of users, QoS, Partitions, where necessary. Any other question, don't hesitate to open a new bug. Thanks! |