Hi,

yes, modifying the database directly seems to be the only way.

Part of the story is, I think, that the account name is used as the primary key instead of some account ID... which would at least make it possible to rename an account.

Associations are however referenced by an ID, so ... yes one can modify the entries of the clustername_assoc_table to move an association together with its recorded usage (note that Fairshare is apparently calculated from the assoc_usage file inside the StateSaveLocation directory, so remember to also copy it when setting up a test scenario).

The downside is that the sreport-ed usage shows up twice, with both the old and the new account. Also the state of the database is then inconsistent with its own log table containing all modifications made to the db. I haven't seen the system complain about it, but who knows ...

Anyway, thanks for your replies!

Best,
Christoph





On 17/06/2019 16.33, Henkel, Andreas wrote:
Hi Christoph,

I think the only way is to modify the database directly. I don’t know if Slurm 
likes it and personally would try it in a copy of the DB with a separate 
slurmdbd to see if the values reported are still correct.

Best regards,

Andreas Henkel

Am 14.06.2019 um 16:16 schrieb Sam Gallop (NBI) <sam.gal...@nbi.ac.uk>:

Hi Christoph,

I suspect that the answer to both of these is no. When I tried to modify an 
account I got ...

$ sudo sacctmgr modify account where name=user1 set account=newaccount1
Can't modify the name of an account

Also, the sacctmgr can only reset a user's rawusage, as it only supports a 
value of 0.

While not exactly what you want you could add the user to the new account, 
change the defaultaccount and then remove the user from the old account. 
However it doesn't retain the user's historical usage which I guess is 
ultimately what you want.

---
Sam Gallop

-----Original Message-----
From: slurm-users <slurm-users-boun...@lists.schedmd.com> On Behalf Of 
Christoph Brüning
Sent: 12 June 2019 10:58
To: slurm-users@lists.schedmd.com
Subject: [slurm-users] Rename account or move user from one account to another

Hi everyone,

is it somehow possible to move a user between accounts together with his/her 
usage? I.e. transfer the historical resource consumption from one association 
to another?

In a related question: is it possible to rename an account?

While I could, of course, tamper with the underlying MariaDB, it does not 
exactly appear to be a convenient or elegant solution...

Best,
Christoph


--
Dr. Christoph Brüning
Universität Würzburg
Rechenzentrum
Am Hubland
D-97074 Würzburg
Tel.: +49 931 31-80499


--
Dr. Christoph Brüning
Universität Würzburg
Rechenzentrum
Am Hubland
D-97074 Würzburg
Tel.: +49 931 31-80499

Reply via email to