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

Adding delay after new nodes are provisioned by cluster-autoscaler #6707

Open
acesir opened this issue Apr 13, 2024 · 6 comments
Open

Adding delay after new nodes are provisioned by cluster-autoscaler #6707

acesir opened this issue Apr 13, 2024 · 6 comments
Labels
area/cluster-autoscaler kind/feature Categorizes issue or PR as related to a new feature.

Comments

@acesir
Copy link

acesir commented Apr 13, 2024

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.:

When using NVIDIA GPU Operator it takes a few minutes for all the daemonsets to install required bits, like CUDA toolkit/etc before the node is advertised with GPU's to kubernetes. What ends up happening is that 2 nodes end up being provisioned due to the delay when GPU operator starts it's process and autoscaler will start adding an additional node.

Describe the solution you'd like.:

Ability to have a delay option after add would help solve this as the autoscaler would ignore adding additional nodes while GPU Operator finishes it's process and the pod is scheduled

I am not sure if there are other ways to solve this but currently we just overprovision and those nodes will scale down correctly but it can get out of hand when multiple pods are scheduled and it gets out of hand.

Here is a detailed example of how this was done in OpenShift and illustrating the same problem with GPU Operator and over provisioning: https://www.redhat.com/en/blog/autoscaling-nvidia-gpus-on-red-hat-openshift

@acesir acesir added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 13, 2024
@chaitushiva
Copy link

@acesir , This is interesting and did you try adding a delay in CA scan interval https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-can-i-modify-cluster-autoscaler-reaction-time?

@acesir
Copy link
Author

acesir commented Apr 16, 2024

@acesir , This is interesting and did you try adding a delay in CA scan interval https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-can-i-modify-cluster-autoscaler-reaction-time?

Scan interval doesn't solve the issue as it would then slow down the time of everything being provisioned and we have mixes of GPU/CPU. The issue at hand being handled after adding nodes would minimize the effect by targeting only recently added nodes/nodepools over scan interval which would impact everything in the cluster

@EskiSlav
Copy link

EskiSlav commented Jun 3, 2024

As I understood I have the similar issue.
My Node group has 0 instances. I schedule two pods which can easily be fitted on one node (t3.medium) but it has userdata which runs for ~2 mins and CA starts spinning up new instances, because it cannot schedule pods on the instance that is being provisioned. I'd like to have a delay between nodes scaling. For example after the node provisioned wait for 3 minutes to provision an additional one.

@adrianmoisey
Copy link
Member

/area cluster-autoscaler

@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 Oct 6, 2024
@kylos101
Copy link

kylos101 commented Oct 8, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

7 participants