{"record":{"id":"18c2246ef5c289f0","repo":"kubernetes/kops","slug":"errshutdown","errorCode":"errShutdown","errorMessage":"the client is shutdown","messagePattern":"the client is shutdown","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/otel/otlptracefile/client.go","lineNumber":87,"sourceCode":"}\n\n// Stop implements otlptrace.Client.\nfunc (c *client) Stop(ctx context.Context) error {\n\tc.writerMutex.Lock()\n\tdefer c.writerMutex.Unlock()\n\n\tif c.writer != nil {\n\t\terr := c.writer.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tc.writer = nil\n\t}\n\n\treturn nil\n}\n\nvar errShutdown = errors.New(\"the client is shutdown\")\n\n// UploadTraces implements otlptrace.Client.\nfunc (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.ResourceSpans) error {\n\tc.writerMutex.RLock()\n\tdefer c.writerMutex.RUnlock()\n\n\tif c.writer == nil {\n\t\treturn errShutdown\n\t}\n\n\treturn c.writer.writeTraces(ctx, &coltracepb.ExportTraceServiceRequest{\n\t\tResourceSpans: protoSpans,\n\t})\n}\n\n// MarshalLog is the marshaling function used by the logging system to represent this Client.\nfunc (c *client) MarshalLog() interface{} {\n\treturn struct {","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/otel/otlptracefile/client.go#L69-L105","documentation":"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.","triggerScenarios":"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).","commonSituations":"Cluster provisioned by an older kOps version using launch configurations; ASG hand-edited or created by Terraform with LaunchConfigurationName; partial MixedInstancesPolicy responses.","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"],"exampleFix":"// before\n} else {\n\treturn \"\", fmt.Errorf(\"error finding launch template or configuration for autoscaling group: %s\", aws.ToString(g.AutoScalingGroupName))\n}\n// after\n} else if g.LaunchConfigurationName != nil {\n\t// legacy launch-configuration ASGs are not supported for LT lookup\n\treturn \"\", fmt.Errorf(\"ASG %s uses a launch configuration; migrate to launch templates\", aws.ToString(g.AutoScalingGroupName))\n} else {\n\treturn \"\", fmt.Errorf(\"error finding launch template or configuration for autoscaling group: %s\", aws.ToString(g.AutoScalingGroupName))\n}","handlingStrategy":"validation","validationCode":"if g.LaunchTemplate == nil && g.MixedInstancesPolicy == nil {\n  return fmt.Errorf(\"ASG %q has no launch template; migrate from launch configurations\", aws.ToString(g.AutoScalingGroupName))\n}","typeGuard":"func usesLaunchTemplate(g *autoscalingtypes.AutoScalingGroup) bool {\n  return g.LaunchTemplate != nil || (g.MixedInstancesPolicy != nil && g.MixedInstancesPolicy.LaunchTemplate != nil && g.MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification != nil)\n}","tryCatchPattern":"err := rollingUpdate(ctx, cluster)\nif err != nil && strings.Contains(err.Error(), \"error finding launch template or configuration\") {\n  // migrate the ASG to launch templates via kops update, then retry\n  migrateToLaunchTemplates(); retry()\n}","preventionTips":["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"],"tags":["aws","autoscaling","launch-template","rolling-update"],"backgroundTag":"launch-template-resolution-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}