-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix image pulling with Transfer service #8272
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
Fix image pulling with Transfer service #8272
Conversation
|
Hi @ethan-lowman-dd. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
Thanks for the PR, I can take a look. |
Signed-off-by: Ethan Lowman <[email protected]>
87d65d0 to
3e87f05
Compare
| return nil, fmt.Errorf("%s: platform configuration %v invalid", plugin.TransferPlugin, uc.platform) | ||
| } | ||
|
|
||
| s, err := ic.GetByID(plugin.SnapshotPlugin, uc.snapshotter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think we can ensure the snapshot supports the platform since
the plugin exports supported platforms https://github.com/containerd/containerd/blob/main/plugin/context.go#L76.
But current plugin package api is not friendly to do that right now. It can be a follow-up enhancement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rely on SnapshotsService here? then to getSnapshotter
https://github.com/containerd/containerd/blob/main/services/snapshots/service.go#L54-L81
|
/ok-to-test |
|
@dims: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
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. |
|
/ok-to-test |
| // Load packages with type registrations | ||
| _ "github.com/containerd/containerd/pkg/transfer/archive" | ||
| _ "github.com/containerd/containerd/pkg/transfer/image" | ||
| _ "github.com/containerd/containerd/pkg/transfer/registry" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being late for the party.
I did forget to load the newly created registry package when I moved registry related stuffs from image package to it.
Thanks for fixing this!
dmcgowan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have a follow up for this one, let's get this one in first
#8062 and #8193 seem to have broken image pulling using
ctr image pull --local=false. This PR attempts to address that.The first issue is that the new
OCIRegistrytransfer types are not registered due to the missingimport _ "github.com/containerd/containerd/pkg/transfer/registry". This results in the errorOnce that's fixed, the next issue encountered on image pull is:
This appears to be because the
unpack.Platforms constructed inplugins/transfer/plugin.godo not have the Snapshotter or Applier fields set.I don't think this PR is a complete fix (e.g. there appears to be no way to configure the
SnapshotterOptsandApplyOptsfor the transfer service) and I'm not sure if it's correct (should we use theplugin.DiffPluginor theDiffServiceplugin.ServicePlugin?). I primarily put this PR together so I could test pulling via the Transfer service in #8269