Skip to content

Log when multi-node consolidation is skipped due to budget#6

Open
jamesmt-aws wants to merge 1 commit intomainfrom
k2-log-multinode-skip
Open

Log when multi-node consolidation is skipped due to budget#6
jamesmt-aws wants to merge 1 commit intomainfrom
k2-log-multinode-skip

Conversation

@jamesmt-aws
Copy link
Copy Markdown
Owner

Summary

  • Add debug-level log when budget filtering reduces multi-node candidates below the minimum of 2
  • Add debug-level log in firstNConsolidationOption when called with fewer than 2 candidates
  • Multi-node consolidation now explains why it returned early instead of silently producing no output

Motivation

In kubernetes-sigs/karpenter#1962, multi-node consolidation never ran because ceil(5% * 20 nodes) = 1, which is below the minimum of 2 candidates. The controller returned silently with no log output, even at debug level. It took seven experiments to discover this silent early-return. A single log line would have made the root cause obvious.

Test plan

  • With nodes: "5%" budget on a 20-node cluster, verify debug log: "multi-node consolidation skipped, budget filtering reduced candidates below minimum of 2"
  • With sufficient budget but only 1 eligible candidate, verify debug log: "multi-node consolidation requires at least 2 candidates"
  • No behavior change beyond logging

@jamesmt-aws jamesmt-aws force-pushed the k2-log-multinode-skip branch from 18289cf to 93e062f Compare March 23, 2026 07:03
Add debug-level log messages when multi-node consolidation cannot
run because budget filtering reduces candidates below the minimum
of 2. Previously this was a silent early return that produced no
output even at debug level.

Ref: kubernetes-sigs#1962
@jamesmt-aws jamesmt-aws force-pushed the k2-log-multinode-skip branch from 93e062f to 49f24de Compare March 23, 2026 07:08
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.

2 participants