[slurm-users] Slurm account names limitation: must be unique in the first 20 characters
Jeffrey Frey
frey at udel.edu
Mon Dec 10 11:32:57 MST 2018
For MySQL to use a text column as a primary key, it requires a limit on how many bytes are significant. Just check through src/plugins/accounting_storage/mysql/accounting_storage_mysql.c and you'll see lots of primary keys with "(20)" indexing lengths specified.
With an extant database you may be able to alter all respective tables' primary key definitions. Whether or not MySQL will rebuild the primary key index for you, I can't say. My guess is that a safer solution would be to export the database, shutdown Slurm/Slurmdbd, alter the primary key definitions in the export, then import into a fresh database; point Slurmdbd at your fresh database and bring it all back online. Obviously you could have issues in the future when/if the database schema changes and Slurm tries to auto-upgrade your extant database.
> On Dec 10, 2018, at 11:33 AM, Jacob Chappell <jacob.chappell at uky.edu> wrote:
>
> Hi all,
>
> We've come across an issue recently with Slurm account names. Our center uses fairly long Slurm account names, as they record various important pieces of information about the account such as the user's unique id, department, project name, etc. Consequently, our account naming structure is such that many accounts share a pretty lengthy common prefix. We've discovered that if two account names share a prefix of more than 20 characters, Slurm will error out and not add the account. We think this has to do with the sub_part for the name index set on the acct_table table (see below):
>
> MariaDB [slurm_accounting]> show index from acct_table\G;
> *************************** 1. row ***************************
> Table: acct_table
> Non_unique: 0
> Key_name: PRIMARY
> Seq_in_index: 1
> Column_name: name
> Collation: A
> Cardinality: 14
> Sub_part: 20
> Packed: NULL
> Null:
> Index_type: BTREE
> Comment:
> Index_comment:
> 1 row in set (0.00 sec)
>
> Can this be changed? Changing our account names to not share a common prefix would be difficult and cause problems with a lot of other software we use that is site-specific. We'd rather just remove the sub_part (accepting the performance implications).
>
> Thanks,
> __________________________________________________
> Jacob D. Chappell, CSM
> Research Computing Associate
> Research Computing | Research Computing Infrastructure
> Information Technology Services | University of Kentucky
> jacob.chappell at uky.edu
::::::::::::::::::::::::::::::::::::::::::::::::::::::
Jeffrey T. Frey, Ph.D.
Systems Programmer V / HPC Management
Network & Systems Services / College of Engineering
University of Delaware, Newark DE 19716
Office: (302) 831-6034 Mobile: (302) 419-4976
::::::::::::::::::::::::::::::::::::::::::::::::::::::
More information about the slurm-users
mailing list