Skip to content

fix(autoscaler): leave a NotReady node out of the memory check - #158

Merged
Mearman merged 1 commit into
mainfrom
fix/autoscaler-notready-memory
Nov 1, 2026
Merged

Mearman merged 1 commit into
mainfrom
fix/autoscaler-notready-memory

Conversation

@Mearman

@Mearman Mearman commented Nov 1, 2026

Copy link
Copy Markdown
Member

Fixes #157

kubectl top nodes prints <unknown> for a node whose kubelet has stopped reporting. A NotReady node inside the eligibility selector therefore tripped the fail-safe on every poll and held every runner set at the floor, although the node places no runner pod and the ceiling already leaves it out.

The poll now reads the nodes once, and both the ceiling and the memory check decide which nodes are Ready from the same jq definition (scripts/autoscaler-node.jq). A figure counts only for a Ready node. A Ready node whose figure cannot be parsed still fails safe, and so does a node list that cannot be read. The ceiling used to read the nodes itself, so a failed node list now fails safe instead of keeping the last ceiling.

The unit tests cover a False and an Unknown Ready condition with and without a selector, a NotReady node reporting a stale figure, and a Ready node with an unreadable figure beside a NotReady one. Breaking either the skip or the shared definition makes them fail. A new image test checks that every jq module a program includes is copied into the autoscaler image. I did not run tests/autoscaler_ceiling/run.sh (it needs kind and Docker); it covers the ceiling on one Ready node and is unaffected by the memory check.

`kubectl top nodes` prints `<unknown>` for a node whose kubelet has stopped reporting, so one
NotReady node inside the eligibility selector tripped the fail-safe on every poll and held every
runner set at the floor while jobs queued, although the node places no runner pod and the ceiling
already ignores it.

The poll now reads the nodes once and both the ceiling and the memory check take their idea of a
Ready node from the same jq definition (`scripts/autoscaler-node.jq`). A Ready node whose figure
cannot be parsed still fails safe, and so does a node list that cannot be read.
@Mearman
Mearman marked this pull request as ready for review November 1, 2026 18:57
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-11-01T18:57:52.090108Z
We couldn’t complete this review. Comment @codex security review to try again.
710aad6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit 2520da4 into main Nov 1, 2026
16 checks passed
@Mearman
Mearman deleted the fix/autoscaler-notready-memory branch November 1, 2026 18:58
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.12.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autoscaler fail-safe throttles the whole pool when one eligible node is NotReady

1 participant