Open angel-devicente opened 11 months ago
Can you specify what is "not working"? Currently, scontrol is just utilized to get the time limits for each partition. If you don't use a partition time limit it should be a no-op and on multiple clusters it could cause some inaccuracies if the same partition is specified multiple times with different time limits.
Here are my first thoughts:
The main issue I foresee with this is a call for -M all
may clobber job ids. reportseff uses the jobid as a unique identifier and if clusters each have the same job id the sacct parsing will get mangled.
Feel free to add the server option. Handling duplicate job ids is more challenging as it would require a significant rewrite of jobs and job collections (which is needed to handle retries anyways).
By "not working" I meant that since I'm running reportseff in a machine where no slurmctld is running, the scontrol command just hangs.
Option two is what I had in mind (being able to add something lime "-M
When I have some time, I will add this and submit a PR.
I'm using
reportseff
in a multi-cluster environment, and from a machine that is runningslurmdbd
but whereslurmctld
daemons are running in other machines. For this, when I runsacct
I have no issue, since I can dosacct -M <server>
or evensacct -M all
, which is very handy for central administration of the multi-cluster environment.With reportseff, I can do something similar
reportseff --extra-args "-M <server>"
, but as it is, it is not working becausedb_inquirer.py
issues the commandcommand_args = "scontrol show partition".split()
, which should get the-M <server>
specification as well.Giving the whole
extra-args
to thescontrol
command is not, I suppose, a good option, sincesacct
andscontrol
don't share the same args. Perhaps a new "-M" parameter can be added, so if provided it is simply added to both thesacct
andscontrol
commands? I would add it myself, but not sure what is done with the partition information inreportseff
, and how you would handle the situation when "-M" refers to more than one server.