Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the ability to ignore min-count for long unregistered nodes #6360

Closed
Bryce-Soghigian opened this issue Dec 8, 2023 · 5 comments
Closed
Assignees
Labels
area/cluster-autoscaler area/core-autoscaler Denotes an issue that is related to the core autoscaler and is not specific to any provider. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@Bryce-Soghigian
Copy link
Member

Bryce-Soghigian commented Dec 8, 2023

Which component are you using?: Cluster Autoscaler
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:

Describe the solution you'd like.:

Problem Statement and Proposed Solution

Issue with Unregistered Nodes in Cluster Autoscaler

When using Cluster Autoscaler, nodes may sometimes fail to register successfully with the APIServer. The expected behavior today is that we just will skip deletion of these nodes if they violate min count. In such scenarios, the Cluster Autoscaler skips the deletion of these unresponsive or unregistered nodes. This leads to a significant problem: nodes that fail due to configuration or networking issues remain in the cluster indefinitely. Consequently, customers incur costs for these unusable nodes. The min count will be filled with broken nodes.

The current logic in the Cluster Autoscaler is as follows:

possibleToDelete := size - nodeGroup.MinSize()
if possibleToDelete <= 0 {
    klog.Warningf("Node group %s min size reached, skipping removal of %v unregistered nodes", nodeGroupId, len(unregisteredNodesToDelete))
    continue
}

This implementation results in the following issue:

  1. Persistent Unregistered Nodes: Nodes that have been unregistered for an extended period are never removed if doing so would breach the minimum node count.

Suggested Solution: Ignoring Min Count for Long-Unregistered Nodes

To address this, the proposed solution involves modifying the behavior of the autoscaler to allow the deletion of long-unregistered nodes, even if it means violating the minimum node count. This approach aims to prevent the accumulation of unusable and costly nodes in the cluster.

Implementation of the Solution: Feature Flag

The introduction of this behavior can be controlled through a feature flag, allowing a cautious and reversible implementation. The flag would be as follows:

ignoreMinCountForUnregisteredNodes = flag.Bool("ignore-min-count-for-unregistered-nodes", false, "Toggle for deletion of unregistered nodes and having them not be considered in min count")

By default, this flag will be set to false. This ensures that the existing behavior is maintained unless explicitly overridden. After a period of observation and validation to confirm that this new approach does not introduce any significant long-term problems, the flag could be removed, making this behavior the standard operational mode of the autoscaler.

Additional context.:
We would like to change our autoscaler to ignore min count for these nodes, in the case that there is some problem in scale up that would leave around unused VMs that we still have to pay for.

@Bryce-Soghigian Bryce-Soghigian added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 8, 2023
@Bryce-Soghigian
Copy link
Member Author

/assign Bryce-Soghigian

@towca towca added area/cluster-autoscaler area/core-autoscaler Denotes an issue that is related to the core autoscaler and is not specific to any provider. labels Mar 21, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 19, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 19, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/core-autoscaler Denotes an issue that is related to the core autoscaler and is not specific to any provider. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants