kubernetes/kubernetes · warning

%v failed with : %v

Error message

%v failed with : %v

What it means

Logged via utilruntime.HandleError in processNextWorkItem when syncHandler returns a non-nil error for a DaemonSet key. It is the top-level per-key error boundary for the DaemonSet controller; the key is requeued with rate limiting. The wrapped %v is the underlying sync error (status update, pod claim, revision cleanup, etc.).

Source

Thrown at pkg/controller/daemon/daemon_controller.go:411

	for dsc.processNextWorkItem(ctx) {
	}
}

// processNextWorkItem deals with one key off the queue.  It returns false when it's time to quit.
func (dsc *DaemonSetsController) processNextWorkItem(ctx context.Context) bool {
	dsKey, quit := dsc.queue.Get()
	if quit {
		return false
	}
	defer dsc.queue.Done(dsKey)

	err := dsc.syncHandler(ctx, dsKey)
	if err == nil {
		dsc.queue.Forget(dsKey)
		return true
	}

	utilruntime.HandleError(fmt.Errorf("%v failed with : %v", dsKey, err))
	dsc.queue.AddRateLimited(dsKey)

	return true
}

func (dsc *DaemonSetsController) enqueue(ds *apps.DaemonSet) {
	key, err := controller.KeyFunc(ds)
	if err != nil {
		utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %#v: %v", ds, err))
		return
	}

	// TODO: Handle overlapping controllers better. See comment in ReplicationManager.
	dsc.queue.Add(key)
}

func (dsc *DaemonSetsController) enqueueDaemonSetAfter(obj interface{}, after time.Duration) {
	key, err := controller.KeyFunc(obj)

View on GitHub (pinned to 94c1367642)

Solutions

  1. Read the second %v to find the root cause; this message is only the envelope.
  2. For transient errors, rely on the rate-limited requeue.
  3. If persistent, check the DaemonSet spec and controller RBAC.
  4. Confirm the DaemonSet still exists; a deleted DS will keep requeuing until the delete event clears the key.
Defensive patterns

Strategy: retry

Try / catch

// the controller already does this; mirror the pattern in custom code:
if err := dsc.syncHandler(ctx, dsKey); err != nil {
    if apierrors.IsNotFound(err) { dsc.queue.Forget(dsKey); return true }
    dsc.queue.AddRateLimited(dsKey)
}

Prevention

When it happens

Trigger: Any syncHandler(ctx, dsKey) returning err != nil: DaemonSet lookup failure, getNodesToDaemonPods failure, status update conflict, history cleanup failure, etc.

Common situations: Transient apiserver errors, deleted DaemonSets still queued, RBAC gaps for pods/daemonsets/controllerrevisions, node label/affinity churn causing repeated requeue.

Related errors


AI-assisted analysis of kubernetes/kubernetes@94c1367642 (2026-08-08). Data as JSON: /api/errors/aefb9bf38820dfa6. Report an issue: GitHub.