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

[release/1.6] ctr import: strictly match platform #7594

Conversation

ginglis13
Copy link
Contributor

@ginglis13 ginglis13 commented Oct 27, 2022

Currently, ctr import will use loose matching as defined by platforms.Only(), meaning in the case of platform linux/amd64 as in issue#6441, importing will also match linux/386 platform on the image-to-be-imported's index. However, that image-to-be-imported may not have both the linux/amd64 and linux/386 platform contents, resulting in a failure to unpack the image. This change makes that check strict such that the requested platform to import for is the only platform content imported. Both ctr pull and ctr export will treat the platform option as strict, so this change makes ctr import consistent with those.

resolves #6441

Signed-off-by: Gavin Inglis giinglis@amazon.com
(cherry picked from commit 2c98a7b)
Signed-off-by: Gavin Inglis giinglis@amazon.com

Currently, ctr import will use loose matching as defined by
platforms.Only(), meaning in the case of platform linux/amd64 as in
issue#6441, importing will also match linux/386 platform on the
image-to-be-imported's index. However, that image-to-be-imported may not
have both the linux/amd64 and linux/386 platform contents, resulting in
a failure to unpack the image. This change makes that check strict such
that the requested platform to import for is the only platform content
imported. Both ctr pull and ctr export will treat the platform option as
strict, so this change makes ctr import consistent with those.

resolves containerd#6441

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
(cherry picked from commit 2c98a7b)
Signed-off-by: Gavin Inglis <giinglis@amazon.com>
@k8s-ci-robot
Copy link

Hi @ginglis13. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dmcgowan dmcgowan added this to Ready For Review in Code Review Oct 27, 2022
@samuelkarp samuelkarp moved this from Ready For Review to Merge on Green in Code Review Oct 28, 2022
@AkihiroSuda AkihiroSuda merged commit de37b70 into containerd:release/1.6 Oct 28, 2022
Code Review automation moved this from Merge on Green to Done Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants