Skip to content

fix: honor requested num in IdentifyScaleInNodes#1282

Open
ritesh-harihar wants to merge 4 commits intomainfrom
fix-IdentifyScaleInNodes-scales-all-nodes-down
Open

fix: honor requested num in IdentifyScaleInNodes#1282
ritesh-harihar wants to merge 4 commits intomainfrom
fix-IdentifyScaleInNodes-scales-all-nodes-down

Conversation

@ritesh-harihar
Copy link
Copy Markdown
Collaborator

@ritesh-harihar ritesh-harihar commented Apr 22, 2026

Description
scale-in identification could return more nodes than requested, causing plugins to potentially drain/destroy too many nodes.

Problem
IdentifyScaleInNodes(cfg, num) was not enforcing the requested num consistently, which broke expected compatibility behavior for external plugins relying on this API.

Changes

  • Ensure scale-in identification respects requested node count.
  • Keep remote-check pre-scale-in behavior intact (identify eligible nodes, filter by remote IDs, then select).
  • Add/extend regression coverage for:
    - honoring requested num
    - remote-check behavior
    - rejecting non-positive num inputs

JIRA ISSUE

Testing:

  • validated via live Nomad test-setup flow + focused test suite.

  • Previous flow:

Screenshot 2026-04-22 at 12 05 07 PM
Screenshot 2026-04-22 at 12 05 23 PM
  • Current flow:
Screenshot 2026-04-22 at 10 56 01 AM
Screenshot 2026-04-22 at 10 56 24 AM
  • 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.

@ritesh-harihar ritesh-harihar self-assigned this Apr 22, 2026
@ritesh-harihar ritesh-harihar linked an issue Apr 22, 2026 that may be closed by this pull request
@ritesh-harihar ritesh-harihar marked this pull request as ready for review April 22, 2026 13:55
@ritesh-harihar ritesh-harihar requested review from a team as code owners April 22, 2026 13:55
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.

IdentifyScaleInNodes scales all nodes down

1 participant