Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.0 backport] c8d/inspect: Ignore manifest with missing config #46244

Merged
merged 1 commit into from Aug 18, 2023

Conversation

vvoland
Copy link
Contributor

@vvoland vvoland commented Aug 16, 2023

(cherry picked from commit a64adda)

- What I did
Fixed failure to inspect image if any of its present manifest references an image config which isn't present locally.

- How I did it
Ignore c8d NotFound error when

- How to verify it

$ docker pull busybox:1.36.1
$ docker pull --platform linux/amd64 busybox:1.36.1
$ ctr content rm sha256:a416a98b71e224a31ee99cff8e16063554498227d2b696152a9c3e0aa65e5824 # Delete amd64 config

Before

$ docker image inspect busybox:1.36.1
[]
Error response from daemon: failed to read config content: content digest sha256:a416a98b71e224a31ee99cff8e16063554498227d2b696152a9c3e0aa65e5824: not found

After

$ docker image inspect busybox:1.36.1
[
    {
        "Id": "sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79",
        "RepoTags": [
            "busybox:latest"
        ],
        "RepoDigests": [
            "busybox@sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79"
        ],
        (...)
        "Architecture": "arm64",
        "Variant": "v8",
        "Os": "linux",
        "Size": 1920927,
        "VirtualSize": 1920927,
        (...)
    }
]

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@vvoland vvoland added area/images kind/bugfix PR's that fix bugs containerd-integration Issues and PRs related to containerd integration labels Aug 16, 2023
@vvoland vvoland added this to the 24.0.6 milestone Aug 16, 2023
@vvoland vvoland force-pushed the c8d-inspect-handle-missing-config-24 branch from be52b00 to d4b3c3f Compare August 16, 2023 13:34
Fix a failure to inspect image if any of its present manifest references
an image config which isn't present locally.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit a64adda)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland force-pushed the c8d-inspect-handle-missing-config-24 branch from d4b3c3f to 600aa7b Compare August 17, 2023 07:49
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 8d43772 into moby:24.0 Aug 18, 2023
102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/images containerd-integration Issues and PRs related to containerd integration kind/bugfix PR's that fix bugs status/4-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants