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

save snapshot from gc when unpack image #1802

Merged
merged 1 commit into from Nov 27, 2017

Conversation

yanxuean
Copy link
Member

Signed-off-by: yanxuean yan.xuean@zte.com.cn

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
@yanxuean
Copy link
Member Author

yanxuean commented Nov 23, 2017

There is a window before the content.Config refers the top snapshot where the snapshots created by image.Unpack() are GCed.
When the user independently call image.Unpack() after calling Pull(), the image.Unpack() don't create context with lease by self, the user don't also. so it is not ok.
It is ok when calling Pull() with option WithPullUnpack , because we create lease in Pull().

Now it will be happened in cri-containerd, because we call Pull() without option WithPullUnpack first, and then call image.Unpack.
@dmcgowan @Random-Liu

@codecov-io
Copy link

codecov-io commented Nov 23, 2017

Codecov Report

Merging #1802 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1802   +/-   ##
=======================================
  Coverage   49.35%   49.35%           
=======================================
  Files          77       77           
  Lines        7695     7695           
=======================================
  Hits         3798     3798           
  Misses       3253     3253           
  Partials      644      644
Flag Coverage Δ
#linux 49.42% <ø> (ø) ⬆️
#windows 44.91% <ø> (ø) ⬆️

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 4af5f65...545f247. Read the comment docs.

@yanxuean yanxuean changed the title prevent snapshot from gc when unpack image save snapshot from gc when unpack image Nov 23, 2017
@yanxuean
Copy link
Member Author

/assign @dmcgowan @crosbymichael
PTAL

@Random-Liu
Copy link
Member

Random-Liu commented Nov 24, 2017

@yanxuean Thanks a lot!
This really looks like the root cause! Thanks for looking into this!
If this works, this will make our test pretty green!
I'll take a look at this during the weekend. Thanks!

/cc @dmcgowan

Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

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

@estesp estesp merged commit 12e7c76 into containerd:master Nov 27, 2017
@crosbymichael
Copy link
Member

@yanxuean does this fix #1785 ?

This was referenced Nov 27, 2017
@yanxuean yanxuean deleted the unpack-lease branch November 28, 2017 03:14
@yanxuean
Copy link
Member Author

@crosbymichael Seem like there are another problem yet.

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.

None yet

6 participants