Repository navigation
Conversation
|
Build succeeded.
|
This commit allows snapshotter to prepare snapshots as well as to prevent the client from downloading the layer's contents. This hopefully enables to reduce time for pulling the image. The client passes basic information of the image layer(ref, digest) to the snapshotter as labels and the snapsohtter can use or simply ignore it. This commit also includes changes on ctr command to make using this functionality easier. Signed-off-by: Kohei Tokunaga <[email protected]>
0c521f8 to
27deca8
Compare
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3846 +/- ##
=========================================
+ Coverage 42.27% 42.37% +0.1%
=========================================
Files 130 131 +1
Lines 14577 14663 +86
=========================================
+ Hits 6162 6214 +52
- Misses 7501 7533 +32
- Partials 914 916 +2
Continue to review full report at Codecov.
|
Signed-off-by: Kohei Tokunaga <[email protected]>
|
Build succeeded.
|
Signed-off-by: Kohei Tokunaga <[email protected]>
|
Build succeeded.
|
| } | ||
| } | ||
|
|
||
| func isPullSkippable(ctx context.Context, sn snapshots.Snapshotter, ref string) func(ocispec.Descriptor, []digest.Digest) bool { |
There was a problem hiding this comment.
Out of scope thinking: containerd provides runtime function and there were two copies of image data: content and snapshotter. For running containers without building function, content data seems duplicate. We can remove the content data after unpack and the isPullSkippable can avoid next round pulling. For example, image A is based on image B. We download image B first and remove the layers from image B. And then when we pulling image A, we can only pull extra layers from A.
Based on your commits, no matter what kind of snapshot is, remote or local snapshoter, if backend snapshotter follow the #3793 design, we can remove duplicate content data.
Signed-off-by: Kohei Tokunaga <[email protected]>
|
Build succeeded.
|
|
#3793 is merged |
|
This should completely address #3731 right? |
|
@siscia Yes, this PR is for #3731 and current remote snapshotter implementation is https://github.com/ktock/remote-snapshotter . |
|
Many thanks! I want to take another round of implementation to make this remote snapshotter work on CVMFS, it won't be immediate because I see a lot of changes from my last attempt but it seems like all the pieces are in place. Hopefully I will report a success! :) |
|
@ktock thanks for opening this! I am currently working on an unpacker refactor which may allow this to be even easier. I will update more next week. |
|
Will the interfacce stay the same or it will be a completely new interface? In other words, does it make sense that I work toward a cvmfs snapshotter or it will be a wasted effort? |
|
@siscia just refactoring some of the client side unpack code, the snapshotter interface will not be changing. Let me know if you have any issues with implementing the latest snapshotter updates related to managing the ref label. |
|
Based on the code from @ktock I wrote a small PR that should enable to work also on /cvmfs containerd/stargz-snapshotter#4 It is still a work in progress with hardcoded path, but it should be the way forward IMHO. It still doesn't work as I expected, giving error: "Too many levels of symbolic links" which is a quite standard error when playing with this things... |
|
Let me report that the remote-snapshotter seems to work also for our use case. The PR I provided is not yet in shape to be merged, but honestly we would need a little bit of discussion on our side to understand what is best. Anyhow the PR is trivial and does not even need to be inside the repository in my understanding. |
|
Big thanks for your testing remote snapshotter and the API! |
|
I'm thinking to fix this patch leveraging #3870 as mentioned here. The most part will remain unchanged but be a bit simpler. The (rough) patch PoC is here and you can test it on this remote snapshotter branch. |
|
@ktock is the main thing that is missing from the other PR the ability to set the extra labels on prepare? I was wondering if we can define a way to propagate some annotations as labels, that would allow intercepting handlers to inject information using the normal handler approach |
|
@dmcgowan Yes. Do you have any idea about the definition of |
|
Or, if we allow users to provide a handler which will be wrapped by Lines 80 to 85 in 30d92ef |
|
@dmcgowan Based on the discussion above I rewrote the PoC of the patch. Then this became very simpler! This is great! You can test it on this remote snapshotter branch. If it's an acceptable design, I'll update this PR. |
This commit allows snapshotter to prepare snapshots as well as to prevent the
client from downloading the layer's contents. This hopefully enables to reduce
time for pulling the image. The client passes basic information of the image
layer(ref, digest) to the snapshotter as labels and the snapsohtter can use or
simply ignore it.
This commit also includes changes on ctr command to make using this
functionality easier.
This commit depends on PR #3793 because the implementation uses the target snapshot reference functionality. So this is a little bit early, but I raised this PR also for discussion based on the concrete implementation.
This functionality enables remote snapshots(discussed on the issue #3731) and you can test it with current remote snapshotter implementation on:
The step of the demo: