Skip to content

Commit

Permalink
log failure information
Browse files Browse the repository at this point in the history
  • Loading branch information
David Morrison committed Mar 3, 2022
1 parent 8d608ac commit 6ecee15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ func (m *asgCache) createPlaceholdersForDesiredNonStartedInstances(groups []*aut
func (m *asgCache) isNodeGroupAvailable(group *autoscaling.Group) (bool, error) {
input := &autoscaling.DescribeScalingActivitiesInput{
AutoScalingGroupName: group.AutoScalingGroupName,
MaxRecords: aws.Int64(1), // We only care about the most recent event
}

start := time.Now()
Expand All @@ -496,6 +495,7 @@ func (m *asgCache) isNodeGroupAvailable(group *autoscaling.Group) (bool, error)
if activity.StartTime.Before(lut) {
break
} else if *activity.StatusCode == "Failed" {
klog.Warningf("ASG %s scaling failed with %s", asgRef.Name, *activity)
return false, nil
}
} else {
Expand Down

0 comments on commit 6ecee15

Please sign in to comment.