From 05beda5c40221a185dc4f5508161fe78e737ef5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20K=C5=82obuszewski?= Date: Thu, 12 Aug 2021 11:03:38 +0200 Subject: [PATCH] Increase time to wait for nodes to become unready https://github.com/kubernetes/autoscaler/pull/3924 changed Cluster Autoscaler behavior to mark nodes as unhealthy only if at least 15m passed since node creation time. --- test/e2e/autoscaling/cluster_size_autoscaling.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/test/e2e/autoscaling/cluster_size_autoscaling.go b/test/e2e/autoscaling/cluster_size_autoscaling.go index 1d17c2bebb4..1f743307711 100644 --- a/test/e2e/autoscaling/cluster_size_autoscaling.go +++ b/test/e2e/autoscaling/cluster_size_autoscaling.go @@ -888,15 +888,11 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() { // If new nodes are disconnected too soon, they'll be considered not started // instead of unready, and cluster won't be considered unhealthy. // - // More precisely, Cluster Autoscaler compares last transition time of - // several readiness conditions to node create time. If it's within - // 2 minutes, it'll assume node is just starting and not unhealthy. - // - // Nodes become ready in less than 1 minute after being created, - // so waiting extra 2 minutes before breaking them (which triggers - // readiness condition transition) should be sufficient, while - // making no assumptions about minimal node startup time. - time.Sleep(2 * time.Minute) + // More precisely, Cluster Autoscaler will never consider a + // node to be unhealthy unless it was created more than 15m + // ago. Within that 15m window, it'll assume node is just + // starting and not unhealthy. + time.Sleep(15 * time.Minute) ginkgo.By("Block network connectivity to some nodes to simulate unhealthy cluster") nodesToBreakCount := int(math.Ceil(math.Max(float64(unhealthyClusterThreshold), 0.5*float64(clusterSize))))