cilium/cilium · warning

failed to collect cilium-operator gops stats: %w

Error message

failed to collect cilium-operator gops stats: %w

What it means

Same gops collection mechanism as the Cilium agent task, but targeting cilium-operator pods and the cilium-operator container. It is returned when SubmitGopsSubtasks fails for the operator pod list, typically because operator pods are absent, not running, or not exec-able. Cause is wrapped with %w.

Source

Thrown at cilium-cli/sysdump/sysdump.go:1340

		},
		{
			CreatesSubtasks: true,
			Description:     "Collecting gops stats from Cilium pods",
			Quick:           true,
			Task: func(_ context.Context) error {
				if err := c.SubmitGopsSubtasks(c.CiliumPods, ciliumAgentContainerName); err != nil {
					return fmt.Errorf("failed to collect Cilium gops: %w", err)
				}
				return nil
			},
		},
		{
			CreatesSubtasks: true,
			Description:     "Collecting gops stats from Cilium-operator pods",
			Quick:           true,
			Task: func(ctx context.Context) error {
				if err := c.SubmitGopsSubtasks(c.CiliumOperatorPods, ciliumOperatorContainerName); err != nil {
					return fmt.Errorf("failed to collect cilium-operator gops stats: %w", err)
				}
				return nil
			},
		},
		{
			CreatesSubtasks: true,
			Description:     "Collecting gops stats from Hubble pods",
			Quick:           true,
			Task: func(ctx context.Context) error {
				p, err := c.Client.ListPods(ctx, c.Options.CiliumNamespace, metav1.ListOptions{
					LabelSelector: c.Options.HubbleLabelSelector,
				})
				if err != nil {
					return fmt.Errorf("failed to get Hubble pods: %w", err)
				}
				if err := c.SubmitGopsSubtasks(FilterPods(p, c.NodeList), hubbleContainerName); err != nil {
					return fmt.Errorf("failed to collect Hubble gops: %w", err)
				}

View on GitHub (pinned to ac7b90affa)

Solutions

  1. Check operator pods: kubectl get pods -n kube-system -l io.cilium/app=operator
  2. Verify the operator deployment exists for your install mode (cilium-operator vs cilium-operator-generic)
  3. Confirm container name cilium-operator matches your Cilium version
  4. Ensure pods/exec RBAC permissions
Defensive patterns

Strategy: validation

Validate before calling

// verify operator pods exist before gops collection
pods, err := clientset.CoreV1().Pods(ns).List(ctx, metav1.ListOptions{LabelSelector: "io.cilium/app=operator"})
if err != nil || len(pods.Items) == 0 { log.Printf("no cilium-operator pods found; skipping operator gops") }

Prevention

When it happens

Trigger: c.SubmitGopsSubtasks(c.CiliumOperatorPods, ciliumOperatorContainerName) returns an error in the 'Collecting gops stats from Cilium-operator pods' task of Run.

Common situations: cilium-operator not deployed (e.g. using clustermesh-apiserver-only setups or HA operator renamed); operator pods crash-looping; container name changed between Cilium versions; exec RBAC missing.

Related errors


AI-assisted analysis of cilium/cilium@ac7b90affa (2026-08-31). Data as JSON: /api/errors/8aa1f9d688bcec3d. Report an issue: GitHub.