Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

job-list: stats missing for configured queue #5688

Closed
grondo opened this issue Jan 18, 2024 · 4 comments · Fixed by #5712
Closed

job-list: stats missing for configured queue #5688

grondo opened this issue Jan 18, 2024 · 4 comments · Fixed by #5712
Assignees

Comments

@grondo
Copy link
Contributor

grondo commented Jan 18, 2024

The job-list module only includes stats for queues to which at least one job has been submitted. This means no stats will appear for a configured but unused queue, except in the case where a job is submitted to a queue and moved to another queue.
After a reload, job-list doesn't update stats while processing events from the eventlog, so no stats will appear for an unused queue even in this case.

It would perhaps be better to initialize zeroed queue stats for all configured queues, so even unused queues will appear in flux job stats output (which is a reasonable assumption a user of this interface or the corresponding RPC might have)

@grondo
Copy link
Contributor Author

grondo commented Jan 18, 2024

The issue is easily observed by adding a queue and then noting that flux job stats contains no queues even though flux queue list shows the queue:

$ echo "[queues.batch]" | flux config load
$ flux queue list
QUEUE    DEFAULTTIME  TIMELIMIT     NNODES     NCORES      NGPUS
batch            inf        inf      0-inf      0-inf      0-inf
$ flux job stats | jq .queues
[]

@chu11
Copy link
Member

chu11 commented Jan 18, 2024

It would perhaps be better to initialize zeroed queue stats for all configured queues, so even unused queues will appear in flux job stats output (which is a reasonable assumption a user of this interface or the corresponding RPC might have)

seems like a good idea.

One possible alternative, if a jobspec or jobspec-update has a queue mentioned, make sure it is job stats. This could handle the very rare case that a queue existed before, but no longer exists? ... I'm not sure this is worth the energy of doing though.

@grondo
Copy link
Contributor Author

grondo commented Jan 18, 2024

That doesn't solve the case of a configured queue that has never had a job submitted to it (as in the example above)

@chu11
Copy link
Member

chu11 commented Jan 18, 2024

oh duh, you're right, it would only solve the bug solved by #5685. So it'd have to be both.

@chu11 chu11 self-assigned this Jan 29, 2024
chu11 added a commit to chu11/flux-core that referenced this issue Jan 31, 2024
Problem: Job queue stats are generated in job-list when a job
is submitted into it.  If a job queue never has a job submitted
to it, no job stats exist for the queue.  This isn't what users
would expect, they should expect queue stats to be 0 for the queue.

Solution: Read the flux config and initialize queue stats to 0 for
any queues that have been configured.

Fixes flux-framework#5688
chu11 added a commit to chu11/flux-core that referenced this issue Jan 31, 2024
Problem: Job queue stats are generated in job-list when a job
is submitted into it.  If a job queue never has a job submitted
to it, no job stats exist for the queue.  This isn't what users
would expect, they should expect queue stats to be 0 for the queue.

Solution: Read the flux config and initialize queue stats to 0 for
any queues that have been configured.

Fixes flux-framework#5688
chu11 added a commit to chu11/flux-core that referenced this issue Feb 1, 2024
Problem: Job queue stats are generated in job-list when a job
is submitted into it.  If a job queue never has a job submitted
to it, no job stats exist for the queue.  This isn't what users
would expect, they should expect queue stats to be 0 for the queue.

Solution: Read the flux config and initialize queue stats to 0 for
any queues that have been configured.

Fixes flux-framework#5688
@mergify mergify bot closed this as completed in #5712 Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants