kubernetes / autoscaler

Autoscaling components for Kubernetes
Apache License 2.0
7.82k stars 3.87k forks source link

cluster-autoscaler fails to backoff when max-node-provision-time is 5 minutes leaving orphaned EC2 instance requiring manual termination #6810

Open charlesritchea opened 2 months ago

charlesritchea commented 2 months ago

Which component are you using?: cluster-autoscaler

What version of the component are you using?: 1.28.4

Component version:

What k8s version are you using (kubectl version)?: 1.28

What environment is this in?:

AWS EKS

What did you expect to happen?:

g4dn-2xlarge ASG timed out after max-node-provision-time of 5 minutes during scale up I'd expect the EC2 instance that was scaled up to eventually be marked as unhealthy, then eventually terminated, then the next ASG group tried or if only one group, to try again

What happened instead?:

The timed out EC2 instance came up eventually and stayed running for > 8 hours (GPU node$$) No other nodes were scaled up and our processing pipeline was effectively paused There were no errors logged in AWS ASG activity history The only errors were logged by cluster-autoscaler including a million "Failed to find readiness information"

How to reproduce it (as minimally and precisely as possible):

I'd bet you could reproduce it quickly by setting max-node-provision-time to 1m (if that is possible)

Anything else we need to know?:

This was already filed here https://github.com/kubernetes/autoscaler/issues/3490 for the same company's cluster 4 years ago. That was about a spot instance, this is about a GPU instance

charlesritchea commented 2 months ago

I just reverted the max-node-provision-time to the default to resolve this, but if there is a minimum max-node-provision-time that actually works it should be documented and enforced

adrianmoisey commented 1 day ago

/area cluster-autoscaler