We use auto_accounts and auto_queues and on OOD v3 this worked just fine. Our account names contain merely lowercase letters and underscores.
Since the upgrade to 4.1.6, changing account in the auto_accounts box no longer adjusts auto_queues to show the partitions defined via AllowAccounts for that partition in slurm.conf if the user is in more than one account containing underscores (when they are in just one it does work). I.e.:
User is in account and account_one - fine, partitions with AllowAccounts=account_one appear when selecting account_one, and disappear again when selecting account
User is in account, account_one and account_two - partitions don’t dynamically adjust, not for account_one or account_two - only those partitions for account appear, nothing changes when you select either account_one or account_two
We’ve seen some things that give us insight but not a fix:
data-alias
Perhaps useful when using custom defined dropdowns, but as far as I’m aware not that useful here. In fact, using the F12 inspector on 4.1.6 we can see that automatically data-alias-account2 appears to be set but isn’t working.
We’ve tried updating to the latest v4.2.3 on a test box and the issue remains.
Note, if we change the account names to remove all underscores so they are simply purely lowercase letters, the issue is resolved. That’s easy to test, but much harder to deploy in production, as there is a tranche of documentation etc. for our facility based around the account names with underscores.
Our hunch is that this is considered fixed but tests only have scope for cluster names containing underscores?
It definitely sounds like you have identified a gap in the current testing, would you mind sharing the relevant lines from sacctmgr -nP show users withassoc format=account,qos where user=<USER> cluster=<CLUSTER> and scontrol show part -o -M <CLUSTER>? You can see the test fixtures that we added as part of the data alias feature in Allow special characters in auto_accounts by adding data-alias by Bubballoo3 · Pull Request #4673 · OSC/ondemand · GitHub to get an idea of what we would need.
It sounds like the situation you describe is absolutely one we would like to support, and while the tests do include multiple accounts with special characters, there is only one with an underscore, so that may be the missing piece. Once we have your output from sacctmgr and scontrol, that should allow us to replicate the bug and eventually add it into the fixtures to ensure it stays fixed.
Example of affected account (redacted to exemplar UID, cluster name etc. but in the same format):
$ sacctmgr -nP show users withassoc format=account,qos where user=ab123456 cluster=cluster
pilot|normal,ood
pilot_gpu|normal,ood
pilot_vip_gpu|normal,ood
$ scontrol show part -o -M cluster
PartitionName=gpu AllowGroups=ALL AllowAccounts=pilot_gpu,sys-admins (etc.)
...
PartitionName=vip AllowGroups=ALL AllowAccounts=pilot_vip_gpu,sys-admins (etc.)
If it helps, an unaffected account would be in just the pilot account or pilot and one of pilot_gpuorpilot_vip_gpu; affected accounts are in pilot and two or more partitions containing underscores. The sys-admins Slurm account is in AllowAccounts for all partitions so our admin team can submit to any partition for testing etc. Users are scoped to a limited number of accounts that match to accompanying partitions. All partitions are named using just lowercase, no spaces or special characters.
That was enough for me to replicate the issue! Interestingly enough, it works fine on latest but not either of the recent releases (4.1.6 or 4.2.3). It appears to just be the auto_queues widget that is broken, the correct HTML for the select widget should be
The fact that this is working on master means that the solution is certainly within reach, it must have been fixed by something that was not explicitly a bug fix and so was not backported. Now that we are aware of it though, you can expect it to be fixed in the next round of patches coming in September.
In the meantime, you could use the data-alias feature to define a global attribute to fill the gap. Something like