Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/cri/server/list_pod_sandbox_metrics_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ func (c *criService) ListPodSandboxMetrics(ctx context.Context, r *runtime.ListP
case errdefs.IsUnavailable(err), errdefs.IsNotFound(err):
log.G(gctx).WithField("podsandboxid", sandbox.ID).WithField("containerid", container.ID).WithError(err).Error("failed to get container metrics, this is likely a transient error")
// Don't return error for transient issues, just log and continue
return nil
continue
case errdefs.IsCanceled(err):
log.G(gctx).WithField("podsandboxid", sandbox.ID).WithField("containerid", container.ID).WithError(err).Debug("metrics collection cancelled")
// Return the cancellation error to stop other goroutines
return err
default:
log.G(gctx).WithField("podsandboxid", sandbox.ID).WithField("containerid", container.ID).WithError(err).Error("failed to collect container metrics")
// Don't return error for individual failures, just log and continue
return nil
continue
}
}

Expand Down
Loading