Skip to content

[release/1.1 backporting] bugfix: unpack should always set the snapshot gc label #3088

Merged
crosbymichael merged 1 commit intocontainerd:release/1.1from
fuweid:me-cp-2876-release-1.1
Mar 11, 2019
Merged

[release/1.1 backporting] bugfix: unpack should always set the snapshot gc label #3088
crosbymichael merged 1 commit intocontainerd:release/1.1from
fuweid:me-cp-2876-release-1.1

Conversation

@fuweid
Copy link
Copy Markdown
Member

@fuweid fuweid commented Mar 11, 2019

There are two images, A and B. A is based on B. If user pulls A first,
then user pulls B. containerd already has the unpacked snapshots in the
backend. During unpacking B, the client doesn't set gc snapshot
reference label to the config descriptor. That is the problem.

The gc module cannot reach the snapshot from the config descriptor. If
user removes the image B, the snapshot will be deleted by gc module.
That is why we should always set the snapshot gc label to config
descriptor.

Signed-off-by: Wei Fu [email protected]
(cherry picked from commit 2d96aad)
Signed-off-by: Wei Fu [email protected]

There are two images, A and B. A is based on B. If user pulls A first,
then user pulls B. containerd already has the unpacked snapshots in the
backend. During unpacking B, the client doesn't set gc snapshot
reference label to the config descriptor. That is the problem.

The gc module cannot reach the snapshot from the config descriptor. If
user removes the image B, the snapshot will be deleted by gc module.
That is why we should always set the snapshot gc label to config
descriptor.

Signed-off-by: Wei Fu <[email protected]>
(cherry picked from commit 2d96aad)
Signed-off-by: Wei Fu <[email protected]>
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3088 into release/1.1 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release/1.1    #3088   +/-   ##
============================================
  Coverage        49.07%   49.07%           
============================================
  Files               85       85           
  Lines             7598     7598           
============================================
  Hits              3729     3729           
  Misses            3194     3194           
  Partials           675      675
Flag Coverage Δ
#linux 49.07% <ø> (ø) ⬆️

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 52bfc9f...4e69228. Read the comment docs.

Copy link
Copy Markdown
Member

@estesp estesp 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
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit 95a8d1d into containerd:release/1.1 Mar 11, 2019
@fuweid fuweid deleted the me-cp-2876-release-1.1 branch August 22, 2019 08:34
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