kubernetes/kops · error

error suspending processes

Error message

error suspending processes: %v

What it means

SuspendProcesses failed while suspending the configured scaling processes right after ASG creation; the ASG exists but its suspend-processes settings were not applied. The wrapped error is the raw AWS autoscaling API error.

Solutions

  1. Verify process names against valid ASG process names (Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer, InstanceRefresh)
  2. Re-run `kops update cluster` to retry
  3. Check IAM policy allows autoscaling:SuspendProcesses

Example fix

// before
suspendProcesses: [Healthcheck]
// after
suspendProcesses: [HealthCheck]
Defensive patterns

Strategy: validation

Validate before calling

var validProcesses = []string{"Launch","Terminate","HealthCheck","ReplaceUnhealthy","AZRebalance","AlarmNotification","ScheduledActions","AddToLoadBalancer","InstanceRefresh"}
for _, p := range ig.Spec.SuspendProcesses {
  if !slices.Contains(validProcesses, p) { return fmt.Errorf("invalid ASG process %q", p) }
}

Prevention

When it happens

Trigger: After ASG creation, SuspendProcesses is called with e.SuspendProcesses entries and AWS rejects it — invalid process name, or the ASG was just created and the process set is not applicable.

Common situations: Typo'd process names in spec (e.g. 'AzRebalance' misspelled), or transient AWS errors right after group creation.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/7ddcc8b1bf3f3a2e. Report an issue: GitHub.

Appendix: source

Thrown at upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go:449

			return fmt.Errorf("error creating AutoScalingGroup: %s", message)
		}

		// @step: attempt to enable the metrics for us
		if _, err := t.Cloud.Autoscaling().EnableMetricsCollection(ctx, &autoscaling.EnableMetricsCollectionInput{
			AutoScalingGroupName: e.Name,
			Granularity:          e.Granularity,
			Metrics:              e.Metrics,
		}); err != nil {
			return fmt.Errorf("error enabling metrics collection for AutoscalingGroup: %v", err)
		}

		if len(*e.SuspendProcesses) > 0 {
			processQuery := &autoscaling.SuspendProcessesInput{}
			processQuery.AutoScalingGroupName = e.Name
			processQuery.ScalingProcesses = *e.SuspendProcesses

			if _, err := t.Cloud.Autoscaling().SuspendProcesses(ctx, processQuery); err != nil {
				return fmt.Errorf("error suspending processes: %v", err)
			}
		}

	} else {
		// @logic: else we have found a autoscaling group and we need to evaluate the difference
		request := &autoscaling.UpdateAutoScalingGroupInput{
			AutoScalingGroupName: e.Name,
		}

		setup := func(req *autoscaling.UpdateAutoScalingGroupInput) *autoscalingtypes.MixedInstancesPolicy {
			if req.MixedInstancesPolicy == nil {
				req.MixedInstancesPolicy = &autoscalingtypes.MixedInstancesPolicy{
					InstancesDistribution: &autoscalingtypes.InstancesDistribution{},
				}
			}

			return req.MixedInstancesPolicy
		}

View on GitHub (pinned to 4c8573c808)