kubernetes/kops · error
errShutdown
errShutdown
Error message
the client is shutdown
What it means
Returned by findAutoscalingGroupLaunchTemplate (used by rolling-update and instance-group operations) when an ASG exposes neither a direct LaunchTemplate nor a MixedInstancesPolicy launch template specification. kOps requires one of these to compute the launch template ID; launch configurations (legacy) are not accepted by this path.
Source
Thrown at pkg/otel/otlptracefile/client.go:87
}
// Stop implements otlptrace.Client.
func (c *client) Stop(ctx context.Context) error {
c.writerMutex.Lock()
defer c.writerMutex.Unlock()
if c.writer != nil {
err := c.writer.Close()
if err != nil {
return err
}
c.writer = nil
}
return nil
}
var errShutdown = errors.New("the client is shutdown")
// UploadTraces implements otlptrace.Client.
func (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.ResourceSpans) error {
c.writerMutex.RLock()
defer c.writerMutex.RUnlock()
if c.writer == nil {
return errShutdown
}
return c.writer.writeTraces(ctx, &coltracepb.ExportTraceServiceRequest{
ResourceSpans: protoSpans,
})
}
// MarshalLog is the marshaling function used by the logging system to represent this Client.
func (c *client) MarshalLog() interface{} {
return struct {View on GitHub (pinned to 4c8573c808)
Solutions
- Migrate the cluster to launch templates: `kops update cluster` with Kubelet/IG spec on a kOps version defaulting to launch templates
- Replace the ASG via `kops rolling-update cluster --cloudonly` after switching to launch templates
- Check for externally-managed ASGs tagged with the cluster tags and remove them
- If you must support launch configurations, patch the fallback path to use DescribeLaunchConfigurations
Example fix
// before
} else {
return "", fmt.Errorf("error finding launch template or configuration for autoscaling group: %s", aws.ToString(g.AutoScalingGroupName))
}
// after
} else if g.LaunchConfigurationName != nil {
// legacy launch-configuration ASGs are not supported for LT lookup
return "", fmt.Errorf("ASG %s uses a launch configuration; migrate to launch templates", aws.ToString(g.AutoScalingGroupName))
} else {
return "", fmt.Errorf("error finding launch template or configuration for autoscaling group: %s", aws.ToString(g.AutoScalingGroupName))
} Defensive patterns
Strategy: validation
Validate before calling
if g.LaunchTemplate == nil && g.MixedInstancesPolicy == nil {
return fmt.Errorf("ASG %q has no launch template; migrate from launch configurations", aws.ToString(g.AutoScalingGroupName))
} Type guard
func usesLaunchTemplate(g *autoscalingtypes.AutoScalingGroup) bool {
return g.LaunchTemplate != nil || (g.MixedInstancesPolicy != nil && g.MixedInstancesPolicy.LaunchTemplate != nil && g.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification != nil)
} Try / catch
err := rollingUpdate(ctx, cluster)
if err != nil && strings.Contains(err.Error(), "error finding launch template or configuration") {
// migrate the ASG to launch templates via kops update, then retry
migrateToLaunchTemplates(); retry()
} Prevention
- Provision clusters with a kOps version that uses launch templates
- Never create ASGs with classic launch configurations tagged for the cluster
- Check MixedInstancesPolicy completeness when using mixed instance types
- Audit ASGs with aws CLI before rolling updates
When it happens
Trigger: ASG was created with a classic LaunchConfiguration, or the ASG description returned nil for both LaunchTemplate and MixedInstancesPolicy (e.g. externally created ASG or an unexpected AWS API shape).
Common situations: Cluster provisioned by an older kOps version using launch configurations; ASG hand-edited or created by Terraform with LaunchConfigurationName; partial MixedInstancesPolicy responses.
Related errors
- DIGITALOCEAN_ACCESS_TOKEN is required
- expected a aws.Cloud provider
- timed out waiting for volume to detach
- failed to detach instance: %v
- could not find one of launch template or mixed instances pol
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/18c2246ef5c289f0.
Report an issue: GitHub.