From 3db2c0d443109be74d1967a36167a9b764f21754 Mon Sep 17 00:00:00 2001 From: Olivier Pilotte Date: Thu, 8 Jul 2021 09:38:37 -0400 Subject: [PATCH] check if the instance is under an asg add a comment, remove log --- upup/pkg/fi/nodeup/command.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upup/pkg/fi/nodeup/command.go b/upup/pkg/fi/nodeup/command.go index 6014d80525..7c1474010f 100644 --- a/upup/pkg/fi/nodeup/command.go +++ b/upup/pkg/fi/nodeup/command.go @@ -762,6 +762,10 @@ func getAWSConfigurationMode(c *model.NodeupModelContext) (string, error) { if err != nil { return "", fmt.Errorf("error describing instances: %v", err) } + // If the instance is not a part of an ASG, it won't be in a warm pool either. + if len(result.AutoScalingInstances) < 1 { + return "", nil + } lifecycle := fi.StringValue(result.AutoScalingInstances[0].LifecycleState) if strings.HasPrefix(lifecycle, "Warmed:") { klog.Info("instance is entering warm pool")