Skip to content

Exclude terminating machines when managing machineset replicas#1086

Open
takoverflow wants to merge 3 commits intogardener:masterfrom
takoverflow:fix/term_replica
Open

Exclude terminating machines when managing machineset replicas#1086
takoverflow wants to merge 3 commits intogardener:masterfrom
takoverflow:fix/term_replica

Conversation

@takoverflow
Copy link
Member

@takoverflow takoverflow commented Mar 12, 2026

What this PR does / why we need it:
Excludes considering terminating machines in machineset controller when
computing the necessary machines that need to be created/removed.

A machine will only move to terminating state once the machine set has been scaled-down
hence if a machine is already in terminating state, it should be excluded from the list
of machines that are being considered when computing the active replicas of a machine set.

The only other scenario where a machine moves to terminating is when its in Failed state
and the MCS controller proceeds to consider it as a stale machine and marks it
for removal. In this case, by excluding the terminating machine from diff computation,
we ensure that a replacement machine is spawned for the failed machine.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Release note:

Exclude terminating machines when managing machineset replicas to allow for faster replacement of a failed machine.

@takoverflow takoverflow requested a review from a team as a code owner March 12, 2026 09:38
@gardener-prow
Copy link

gardener-prow bot commented Mar 12, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ashwani2k for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Mar 12, 2026
@takoverflow takoverflow added kind/enhancement Enhancement, improvement, extension and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Mar 12, 2026
Copy link
Member

@thiyyakat thiyyakat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for the PR. Just one small suggestion. PTAL.

@gardener-prow gardener-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 12, 2026
@thiyyakat
Copy link
Member

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2026
@gardener-prow
Copy link

gardener-prow bot commented Mar 13, 2026

LGTM label has been added.

DetailsGit tree hash: 340a0ae2f8c56893fbdfa779348d597536173d23

@aaronfern aaronfern added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants