Skip to content

auto_accounts requires all slurm clusters to share the same database #4474

@simonLeary42

Description

@simonLeary42

AccountCache.accounts uses just one slurm adapter:

cluster = Configuration.job_clusters.select(&:slurm?).first
cluster.nil? ? [] : cluster.job_adapter.accounts

In contrast, queues_per_cluster loops over each slurm adapter:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions