-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix pinned the preloaded pause image #9460
Conversation
4f5b28a
to
a127acf
Compare
Signed-off-by: Iceber Gu <[email protected]>
a127acf
to
97c87d8
Compare
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.
@Iceber how the images are preloaded in the containerd? as i know the image tars are loaded in the content store and then imported using ctr.
how other containerd cri specific labels are get added to it? like this one io.cri-containerd.image=managed
? I think the pinned label should get added in the same way
edit: after going through the changes you are doing the same, I was wondering if the image leak problem could be solved the same way? UpdateImage
is also gets called when containerd service is restarted, if the user has updated the sandbox image they definitely need to restart the containerd service and during that we can cleanup the pinned image label
containerd/pkg/cri/server/restart.go
Line 426 in 935b22d
func (c *criService) loadImages(ctx context.Context, cImages []containerd.Image) { |
yes, sometimes the pause image exists before containerd restarts, and containerd may restart for various reasons, such as a manual restart or an upgrade restart. Regardless of whether pre-existing (preloaded) pause image have the |
Does this mean clean up the pinned label of the old pause? |
yes, the current UpdateImage won't work, maybe a new function while containerd restarts to cleanup old pause image |
@Iceber I am ok with the approach but as the feedback from that PR it would be good if we can have a consistent approach so suggested if we can try this
|
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fix pause image already exists but is not pinned.
The code that needs to be fixed is in two places:
io.cri-containerd.image
labelrelated pr: #8866 (comment)