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

Enable to propagate necessary information to snapshotter during unpack #3911

Merged
merged 2 commits into from
Dec 26, 2019

Conversation

ktock
Copy link
Member

@ktock ktock commented Dec 23, 2019

Though containerd gives ChainID to backend snapshotters during unpack for
searching snapshots to be skipped downloading the contents, ChainID isn't enough
for some snapshotters which require additional information of layers.
Some examples are remote snapshotters which is based on stargz filesystem
(requires image-related information to query the contents to docker registry)
and those which is based on CernVM-FS (requires manifest digest, etc. for
providing squashed rootfs).

This commit solves this issue by enabling a handler to inject additional
information of layers to snapshotters during unpack.

Related discussion

You can test it on this remote snapshotter branch and the reproduction steps are here.

We need to discuss reasonable way to integrate handlers to containerd but I'm keeping it separated PR/issue.

Though containerd gives ChainID to backend snapshotters during unpack for
searching snapshots to be skipped downloading the contents, ChainID isn't enough
for some snapshotters which require additional information of layers.
Some examples are remote snapshotters which is based on stargz filesystem
(requires image-related information to query the contents to docker registry)
and those which is based on CernVM-FS (requires manifest digest, etc. for
providing squashed rootfs).

This commit solves this issue by enabling a handler to inject additional
information of layers to snapshotters during unpack.

Signed-off-by: Kohei Tokunaga <[email protected]>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 23, 2019

Build succeeded.

@codecov-io
Copy link

codecov-io commented Dec 23, 2019

Codecov Report

Merging #3911 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3911      +/-   ##
==========================================
- Coverage   42.47%   42.43%   -0.04%     
==========================================
  Files         130      130              
  Lines       14716    14706      -10     
==========================================
- Hits         6251     6241      -10     
  Misses       7544     7544              
  Partials      921      921
Flag Coverage Δ
#linux 45.83% <100%> (-0.04%) ⬇️
#windows 37.95% <66.66%> (-0.06%) ⬇️
Impacted Files Coverage Δ
metadata/snapshot.go 47.71% <100%> (-0.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1a24be...493a36d. Read the comment docs.

unpacker.go Show resolved Hide resolved
@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 25, 2019

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 25, 2019

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 25, 2019

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 25, 2019

Build succeeded.

@ktock ktock requested a review from mxpv December 25, 2019 03:35
Copy link
Member

@mxpv mxpv left a comment

Choose a reason for hiding this comment

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

LGTM

@crosbymichael
Copy link
Member

LGTM

@ktock thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants