{"record":{"id":"d647332097ae578e","repo":"cilium/cilium","slug":"failed-to-submit-logs-task-for-q-q-w","errorCode":null,"errorMessage":"failed to submit logs task for %q (%q): %w","messagePattern":"failed to submit logs task for %q \\(%q\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cilium-cli/sysdump/sysdump.go","lineNumber":2988,"sourceCode":"\t\t\t\tprevious := false\n\t\t\t\tfor _, s := range p.Status.ContainerStatuses {\n\t\t\t\t\tif s.Name == d.Name && s.RestartCount > 0 {\n\t\t\t\t\t\tprevious = true\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif previous {\n\t\t\t\t\tc.logDebug(\"Collecting logs for restarted container %q in pod %q in namespace %q\", d.Name, p.Name, p.Namespace)\n\t\t\t\t\tif err := c.WithFileSink(fmt.Sprintf(ciliumPreviousLogsFileName, p.Name, d.Name), func(out io.Writer) error {\n\t\t\t\t\t\treturn c.Client.GetLogs(ctx, p.Namespace, p.Name, d.Name,\n\t\t\t\t\t\t\tcorev1.PodLogOptions{LimitBytes: &limitBytes, SinceTime: &t, Previous: true, Timestamps: true}, out)\n\t\t\t\t\t}); err != nil {\n\t\t\t\t\t\treturn fmt.Errorf(\"failed to collect previous logs for %q (%q) in namespace %q: %w\", p.Name, d.Name, p.Namespace, err)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t}); err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to submit logs task for %q (%q): %w\", p.Name, d.Name, err)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (c *Collector) submitFlavorSpecificTasks(f k8s.Flavor) error {\n\tswitch f.Kind {\n\tcase k8s.KindEKS:\n\t\tif err := c.Pool.Submit(awsNodeDaemonSetName, func(ctx context.Context) error {\n\t\t\t// Collect the 'kube-system/aws-node' DaemonSet.\n\t\t\td, err := c.Client.GetDaemonSet(ctx, awsNodeDaemonSetNamespace, awsNodeDaemonSetName, metav1.GetOptions{})\n\t\t\tif err != nil {\n\t\t\t\tif k8sErrors.IsNotFound(err) {\n\t\t\t\t\tc.logDebug(\"DaemonSet %q not found in namespace %q - this is expected when running in ENI mode\", awsNodeDaemonSetName, awsNodeDaemonSetNamespace)\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\treturn fmt.Errorf(\"failed to collect daemonset %q in namespace %q: %w\", awsNodeDaemonSetName, awsNodeDaemonSetNamespace, err)","sourceCodeStart":2970,"sourceCodeEnd":3006,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/cilium-cli/sysdump/sysdump.go#L2970-L3006","documentation":"This error is returned when the sysdump fails to SUBMIT the pooled log-collection task for a pod/container pair — i.e. c.Pool.Submit itself errored, not the log fetch. It usually indicates the worker pool is shut down or its context was cancelled while tasks were still being scheduled.","triggerScenarios":"c.Pool.Submit(\"logs-<pod>-<container>\", fn) returns non-nil: the pool's context is done (user abort, global timeout) or the pool rejected the task.","commonSituations":"Interrupting `cilium-cli sysdump` with Ctrl-C while many log tasks are queued; sysdump exceeding its deadline during large-cluster log collection.","solutions":["Re-run the sysdump with a larger --timeout value","Avoid interrupting the command; wait for graceful completion","Reduce scope (fewer namespaces/pods via flags) so tasks finish within the window","Check the wrapped error to confirm whether it is context.Canceled"],"exampleFix":"// before: fail the whole sysdump on submit error\nreturn fmt.Errorf(\"failed to submit logs task for %q (%q): %w\", p.Name, d.Name, err)\n// after\nc.logWarn(\"failed to submit logs task for %q (%q): %v\", p.Name, d.Name, err)\nreturn nil","handlingStrategy":"try-catch","validationCode":"if err := ctx.Err(); err != nil {\n    return fmt.Errorf(\"cannot submit logs task, sysdump context done: %w\", err)\n}","typeGuard":"if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {\n    // pool shutdown, not a log-fetch failure\n}","tryCatchPattern":"if err := c.Pool.Submit(name, fn); err != nil {\n    c.logWarn(\"skipping logs task for %q: %v\", p.Name, err)\n    return nil // or retry with a fresh pool\n}","preventionTips":["Increase --timeout for large clusters","Avoid SIGINT during collection","Scope the sysdump to reduce task count"],"tags":["kubernetes","sysdump","worker-pool","cilium-cli"],"backgroundTag":"worker-pool-submit-failed","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}