-
Notifications
You must be signed in to change notification settings - Fork 45
Description
AccountCache.accounts uses just one slurm adapter:
cluster = Configuration.job_clusters.select(&:slurm?).first
cluster.nil? ? [] : cluster.job_adapter.accountsIn contrast, queues_per_cluster loops over each slurm adapter:
Configuration.job_clusters.each do |cluster|
hash[cluster.id] = cluster.job_adapter.queuesThis 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.