{"record":{"id":"5117840393fef978","repo":"cilium/cilium","slug":"failed-to-collect-cilium-operator-profiles-w","errorCode":null,"errorMessage":"failed to collect cilium-operator profiles: %w","messagePattern":"failed to collect cilium-operator profiles: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cilium-cli/sysdump/sysdump.go","lineNumber":1401,"sourceCode":"\t\t\tTask: func(_ context.Context) error {\n\t\t\t\tif err := c.submitCiliumBugtoolTasks(c.CiliumPods); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect 'cilium-bugtool': %w\", err)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tCreatesSubtasks: true,\n\t\t\tDescription:     \"Collecting profiling data from Cilium Operator pods\",\n\t\t\tQuick:           false,\n\t\t\tTask: func(_ context.Context) error {\n\t\t\t\tif !c.Options.Profiling {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\n\t\t\t\terr := c.SubmitStreamProfilingGopsSubtasks(c.CiliumOperatorPods, ciliumOperatorContainerName, ciliumdef.GopsPortOperator)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect cilium-operator profiles: %w\", err)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tCreatesSubtasks: true,\n\t\t\tDescription:     \"Collecting logs from Cilium pods\",\n\t\t\tQuick:           false,\n\t\t\tTask: func(_ context.Context) error {\n\t\t\t\tif err := c.SubmitLogsTasks(c.CiliumPods, c.Options.LogsSinceTime, c.Options.LogsLimitBytes); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to collect logs from Cilium pods\")\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tCreatesSubtasks: true,\n\t\t\tDescription:     \"Collecting logs from crashing Cilium pods\",","sourceCodeStart":1383,"sourceCodeEnd":1419,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/cilium-cli/sysdump/sysdump.go#L1383-L1419","documentation":"Returned when profiling is enabled and SubmitStreamProfilingGopsSubtasks for cilium-operator pods fails. This submits tasks that stream gops profiling data from the operator container on the gops port (ciliumdef.GopsPortOperator). Failure means operator profiling data could not be collected.","triggerScenarios":"sysdump.Run with Options.Profiling=true and SubmitStreamProfilingSubtasks(c.CiliumOperatorPods, ciliumOperatorContainerName, ciliumdef.GopsPortOperator) returning an error — wrong container name, or gops agent not reachable on the operator's expected port.","commonSituations":"Operator deployed with profiling disabled or a non-default gops port; operator container renamed in custom deployments; network policy blocking pod-to-pod access to the gops port.","solutions":["Confirm the cilium-operator is started with gops/profiling enabled on the default port","Check the operator container name matches what the CLI expects","Disable profiling (--profiling=false) if operator profiles are not required"],"exampleFix":"// before\ncilium-cli sysdump --profiling\n// after (skip profiling when gops is not enabled)\ncilium-cli sysdump","handlingStrategy":"fallback","validationCode":"// confirm the operator gops port is listening before enabling profiling\nconn, err := net.DialTimeout(\"tcp\", fmt.Sprintf(\"%s:%d\", operatorIP, 9890), 2*time.Second)\nif err != nil { log.Printf(\"gops port not reachable; disable --profiling\") } else { conn.Close() }","typeGuard":null,"tryCatchPattern":"if err := c.SubmitStreamProfilingGopsSubtasks(pods, containerName, gopsPort); err != nil {\n    log.Printf(\"profiling collection failed (%v); continuing without profiles\", err)\n}","preventionTips":["Only pass --profiling when operator gops is enabled on the default port","Keep default operator container naming","Treat profiles as optional data; do not fail the whole sysdump on them"],"tags":["kubernetes","gops","profiling","cilium-operator","sysdump"],"backgroundTag":"gops-collection-failed","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}