-
Notifications
You must be signed in to change notification settings - Fork 948
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
bugfix: remove blobs and snapshot when remove image #2075
bugfix: remove blobs and snapshot when remove image #2075
Conversation
Don't add lease to the image since the containerdclient.Pull will add the lease. Signed-off-by: Wei Fu <fhfuwei@163.com>
@@ -196,8 +195,6 @@ func (c *Client) PullImage(ctx context.Context, ref string, authConfig *types.Au | |||
} | |||
|
|||
func (c *Client) pullImage(ctx context.Context, wrapperCli *WrapperClient, ref string, options []containerd.RemoteOpt) (containerd.Image, error) { | |||
ctx = leases.WithLease(ctx, wrapperCli.lease.ID()) | |||
|
|||
img, err := wrapperCli.client.Pull(ctx, ref, options...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should double check!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked it. The GC doesn't clean your image if you don't remove it.
Codecov Report
@@ Coverage Diff @@
## master #2075 +/- ##
===========================================
+ Coverage 51.3% 63.85% +12.55%
===========================================
Files 209 209
Lines 16226 16225 -1
===========================================
+ Hits 8324 10361 +2037
+ Misses 6798 4570 -2228
- Partials 1104 1294 +190
|
lgtm |
Signed-off-by: Wei Fu fhfuwei@163.com
Ⅰ. Describe what this PR did
Don't add lease to the image since the containerdclient.Pull will add
the lease.
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. Describe how you did it
the lease should be released after pull. The containerd client has this functionality so that we should add the one.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews