-
Notifications
You must be signed in to change notification settings - Fork 136
Description
AccountCache.accounts
uses just one slurm adapter:
ondemand/apps/dashboard/app/lib/account_cache.rb
Lines 13 to 14 in 4acd0a2
cluster = Configuration.job_clusters.select(&:slurm?).first | |
cluster.nil? ? [] : cluster.job_adapter.accounts |
In contrast, queues_per_cluster
loops over each slurm adapter:
ondemand/apps/dashboard/app/lib/account_cache.rb
Lines 149 to 150 in 4acd0a2
Configuration.job_clusters.each do |cluster| | |
hash[cluster.id] = cluster.job_adapter.queues |
This works (I think) because scontrol
is specific to one cluster, while sacctmgr
is not.
I think that if accounts were stored in more than one slurm database, any account in any job adapter but the 1st would be omitted from auto_accounts
.
Would it not be more natural to make the slurm adapter to limit its sacctmgr
output to the relevant cluster, and loop over each cluster in AccountCache.accounts
, just like how we looop over each cluster in AccountCache.queues_per_cluster
? This would also remove the need to store cluster information in each AccountInfo
, just like how there's no need to store cluster information in each QueueInfo
.
It would be easier to reason about a job adapter if it was definitely/always limited to one cluster, especially if an adapter needs to be scheduler-agnostic.