Sitelet https://github.com/moby/moby/pull/53456#partial-pull-merging
Skip to content

daemon/containerd: lower log level for image signature validation - #53456

Draft
aryansk wants to merge 1 commit into
moby:masterfrom
aryansk:fix-image-identity-log-level-53455
Draft

daemon/containerd: lower log level for image signature validation#53456
aryansk wants to merge 1 commit into
moby:masterfrom
aryansk:fix-image-identity-log-level-53455

Conversation

@aryansk

@aryansk aryansk commented Aug 24, 2026

Copy link
Copy Markdown

Fixes #53455

Problem

With the containerd image store, image-identity resolution logs at level=error for every locally stored image whose top-level descriptor is not an OCI image index — and repeats indefinitely every 48h because the condition is structural.

ResolveSignatureChain rejects anything not MediaTypeImageIndex (policy-helpers/image/resolve.go:120), and computeSignatureIdentity logs that unconditionally at Error (daemon/containerd/image_identity.go:170):

log.G(ctx).WithError(err).Error("failed to validate image signature")

Two common shapes hit this:

  • application/vnd.oci.image.manifest.v1+json — any single-arch image built via Engine API POST /build
  • application/vnd.docker.distribution.manifest.list.v2+json — Docker media type multi-arch lists still published on Docker Hub

The error is deterministic, so signatureVerificationErrorIsTransient returns false and the 48h cache TTL still applies, but the journal still gets an level=error line every cycle.

Change

  • Lower the log level in computeSignatureIdentity: transient (network/context) failures → Warn, deterministic (non-transient, e.g., non-index media type) → Debug
  • Keeps the signatureVerificationErrorIsTransient return for caching unchanged; only the log level changes
  • Keep unrelated cleanup out of this PR

Why this approach

Single-arch and Docker-list images are expected, not exceptional, so Error is too severe. Debug for deterministic cases silences the 48h noise while remaining visible with debug logging. Warn for transient retains visibility for real network issues.

Testing

command: git diff --check
result: clean

command: go vet ./daemon/containerd (on macOS)
result: same pre-existing failures as clean main (linux-tagged files: runtimeArchitecture, possibleCPUs, safepath.Join, etc.), no new vet errors in changed file

command: grep -n "failed to validate image signature" daemon/containerd/image_identity.go
result: 170-173: conditional Warn/Debug branching

No new tests needed; behavior is log-level only.

Documentation and release impact

  • User-facing documentation updated
  • Changelog/release note needed
  • Migration or compatibility note needed
  • No documentation impact

Review notes

  • Known limitations: none
  • Follow-up issue, if any: none
  • Security/licensing considerations: none

Fixes moby#53455

With the containerd image store, image-identity resolution logs at
level=error for every locally stored image whose descriptor is not an
OCI image index — and repeats every 48h. Single-arch images
(application/vnd.oci.image.manifest.v1+json) built via Engine API
POST /build and Docker Hub multi-arch lists
(application/vnd.docker.distribution.manifest.list.v2+json) are common
and deterministic, so logging them as Error is noisy.

ResolveSignatureChain rejects non-index descriptors by design, and
computeSignatureIdentity logged the wrapped error unconditionally at
Error. Change to Debug for deterministic (non-transient) failures and
Warn for transient (network/context) failures, matching the
signatureVerificationErrorIsTransient distinction and keeping the 48h
cache behavior. The signature verification still returns the transient
flag for caching.

Validation: git diff --check clean; go vet shows same pre-existing
macOS build failures as clean main (linux-tagged files, platform
symbols); no new vet errors in changed file.
@github-actions github-actions Bot added area/daemon Core Engine containerd-integration Issues and PRs related to containerd integration labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/daemon Core Engine containerd-integration Issues and PRs related to containerd integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

containerd image store: image identity logs level=error for every non-index image, on a repeating 48h cadence

1 participant