Skip to content

bjq: Queue Status updates#28120

Open
allisonlarson wants to merge 2 commits into
f-batch-job-queuefrom
f-bjq-small-updates
Open

bjq: Queue Status updates#28120
allisonlarson wants to merge 2 commits into
f-batch-job-queuefrom
f-bjq-small-updates

Conversation

@allisonlarson

@allisonlarson allisonlarson commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the adjustment values to the status output, and adds tenant information to the status as well. That can be taken out or put behind a flag, but it makes monitoring the values much easier.

I introduced a dedicated DynamicPriorityStatusResponse, because adding in new information otherwise was painful.
Examples:

When a job has been run, and the queue has waiting jobs

$ job queue status -json
Batch Queue Tenants
Tenant  Resource  Usage / Total    Percentage
one                                100%
        cpu       100.00 / 100.00  100%
        memory    16.00 / 16.00    100%
three                              0%
        cpu       0.00 / 100.00    0%
        memory    0.00 / 16.00     0%
two                                0%
        cpu       0.00 / 100.00    0%
        memory    0.00 / 16.00     0%
Batch Queue Workloads
JobID   Tenant  Adjusted Priority  Base Priority  Usage  Age  Size
batch2  two     64                 50             10     0    4
batch5  three   63                 50             10     0    3
batch4  one     60                 50             0      0    10

When all the jobs have been run

$ job queue status -json
Batch Queue Tenants
Tenant  Resource  Usage / Total    Percentage
one                                47%
        cpu       191.39 / 387.27  49%
        memory    30.62 / 77.54    39%
three                              24%
        cpu       98.51 / 387.27   25%
        memory    15.76 / 77.54    20%
two                                27%
        cpu       97.37 / 387.27   25%
        memory    31.16 / 77.54    40%
Batch Queue Workloads
JobID  Tenant  Adjusted Priority  Base Priority  Usage  Age  Size

This work highlights that workloads currently get "lost" when they are the one waiting to be placed, because they are removed from the queue and haven't shown up in the usage calculation yet. The size value also feels ambiguous in this format.

Testing & Reproduction steps

Updated the status tests, and tested manually

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

@allisonlarson allisonlarson requested review from a team as code owners June 12, 2026 23:24
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 this pull request may close these issues.

1 participant