Repository navigation
docs(queues): explain that an omitted limit is 0 and fix the example queues - #2532
Conversation
blacksoxx
left a comment
There was a problem hiding this comment.
Thanks for this. The code agrees with the new wording: proportion.go takes queue.Resources.<resource>.Limit as is (memory goes through math.Max(-1, limit*mebibytes)), the Queue CRD has no default for limit, so an omitted limit is 0, and isOverLimit only skips the check when MaxAllowed is exactly -1. A queue that omits memory therefore cannot run any pod that requests memory, which matches the OverLimit condition you saw.
What I checked on c871f61: the three examples now set limit: -1 on every resource that was meant to be unbounded, and the branch merges cleanly into main. Docs-only, so no fragment is needed; a maintainer would have to add the skip-changelog label.
One question rather than a request: the new memory blocks use quota: -1, which also makes the memory quota unlimited, while the GPU examples use quota: 0 for "no guarantee". If the intent is only to lift the cap, quota: 0 with limit: -1 might be the closer example. Leaving that and the decision with the maintainers.
|
Thanks for checking the code path. Agreed, the intent is only to lift the cap, so I switched the memory blocks in the two capped examples to |
…queues An omitted limit in a Queue is read as 0, and a 0 limit blocks that resource completely, including the queue's quota. The Special Values table described it as "No additional resources allowed" and the last example was titled "default value is -1", so the three example queues, which omit memory (and, in the hierarchical one, the cpu and gpu limits), left every pod that requests memory or CPU pending with an OverLimit condition. Describe the actual behavior, set limit: -1 explicitly in the examples (the memory entries added to the capped examples keep quota: 0, like the GPU ones), and drop the "default value is -1" heading. Fixes kai-scheduler#2531 Signed-off-by: YoungjuKim <[email protected]> Assisted-by: Claude <[email protected]>
47bd30b to
2c23833
Compare
|
Thanks @fjvbn2003, 2c23833 reads right: the two capped examples now use |
|
@keinanDaniel the squash push dismissed your earlier approval; the only change since then is the memory quota/limit fix that @blacksoxx confirmed above (2c23833). Could you take another look when you have a moment? Thank you! |
Description
An omitted
limitin a Queue is read as0, and a0limit blocks that resource completely, including the queue's quota. The "Special Values" table describes it as "No additional resources allowed", and the last example is titled "Unlimited Queue - default value is -1", so readers expect a different behavior. The three example queues in this page omitmemory(and the hierarchical one also omitslimiton cpu and gpu), so when applied as written they leave every pod that requests memory or CPU pending with anOverLimit … Limit is 0condition.This PR:
limit: 0 or unsetrow and adds a short paragraph saying that each resource is checked on its own and that-1has to be set explicitly;memory: {quota: -1, limit: -1}to the three examples andlimit: -1to the hierarchical example's cpu and gpu;Tested on KAI Scheduler v0.18.6 (k3s v1.36.5, GPUs simulated with fake-gpu-operator 0.2.1). Same pod for every row:
requests: {cpu: 100m, memory: 32Mi},limits: {nvidia.com/gpu: 1}.Limit is 0 GB(memory)Limit is 0 cores(CPU)Limit is 0 GB(memory)Documentation only; no code or chart changes. Could a maintainer please add the
skip-changeloglabel?Related Issues
Fixes #2531
Checklist
make changelog(or applied theskip-changeloglabel): docs only, label requested aboveBreaking Changes
None.
Additional Notes
This touches the same file as #2275 (MIG quota accounting), but different lines; the patch was checked to apply cleanly on current main. I will rebase if #2275 merges first.
AI disclosure: this change was prepared with the help of an AI coding assistant (Claude Code). Claude found the mismatch, ran the before/after comparison above in a test VM in my home lab, and drafted the diff and this description.
🤖 Generated with Claude Code