daemon/containerd: lower log level for image signature validation - #53456
Draft
aryansk wants to merge 1 commit into
Draft
daemon/containerd: lower log level for image signature validation#53456aryansk wants to merge 1 commit into
aryansk wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #53455
Problem
With the containerd image store, image-identity resolution logs at
level=errorfor every locally stored image whose top-level descriptor is not an OCI image index — and repeats indefinitely every 48h because the condition is structural.ResolveSignatureChainrejects anything notMediaTypeImageIndex(policy-helpers/image/resolve.go:120), andcomputeSignatureIdentitylogs that unconditionally atError(daemon/containerd/image_identity.go:170):Two common shapes hit this:
application/vnd.oci.image.manifest.v1+json— any single-arch image built via Engine APIPOST /buildapplication/vnd.docker.distribution.manifest.list.v2+json— Docker media type multi-arch lists still published on Docker HubThe error is deterministic, so
signatureVerificationErrorIsTransientreturns false and the 48h cache TTL still applies, but the journal still gets anlevel=errorline every cycle.Change
computeSignatureIdentity: transient (network/context) failures →Warn, deterministic (non-transient, e.g., non-index media type) →DebugsignatureVerificationErrorIsTransientreturn for caching unchanged; only the log level changesWhy this approach
Single-arch and Docker-list images are expected, not exceptional, so
Erroris too severe.Debugfor deterministic cases silences the 48h noise while remaining visible with debug logging.Warnfor transient retains visibility for real network issues.Testing
No new tests needed; behavior is log-level only.
Documentation and release impact
Review notes