Skip to content

Enable to propagate necessary information to snapshotter during unpack - #3911

Merged
crosbymichael merged 2 commits into
containerd:masterfrom
ktock:passinfo
Dec 26, 2019
Merged

crosbymichael merged 2 commits into
containerd:masterfrom
ktock:passinfo

Conversation

@ktock

@ktock ktock commented Dec 23, 2019

Copy link
Copy Markdown
Member

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

theopenlab-ci Bot commented Dec 23, 2019

Copy link
Copy Markdown

Build succeeded.

@codecov-io

codecov-io commented Dec 23, 2019 •

Copy link
Copy Markdown

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.

Comment thread unpacker.go Resolved
@theopenlab-ci

theopenlab-ci Bot commented Dec 25, 2019

Copy link
Copy Markdown

Build succeeded.

@theopenlab-ci

theopenlab-ci Bot commented Dec 25, 2019

Copy link
Copy Markdown

Build succeeded.

@theopenlab-ci

theopenlab-ci Bot commented Dec 25, 2019

Copy link
Copy Markdown

Build succeeded.

@theopenlab-ci

theopenlab-ci Bot commented Dec 25, 2019

Copy link
Copy Markdown

Build succeeded.

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

@mxpv mxpv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@crosbymichael

Copy link
Copy Markdown
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