-
Notifications
You must be signed in to change notification settings - Fork 372
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
feat: unpin images from unknown oci bundles #4500
feat: unpin images from unknown oci bundles #4500
Conversation
01c203e
to
3a288e0
Compare
3a288e0
to
9ba4baf
Compare
This pull request has merge conflicts that need to be resolved. |
9ba4baf
to
3d4f4e4
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.
It could be easier to collect all the loaded images and return them as an array from loadAll(). Then use this array of loaded images in unpinAll() to skip the ones that are still on disk. That way, it'd be enough to have a simple marker label that's indicating that an image was originally imported by the OCI bundle importer, whose value is unused and could default to the empty string.
ebb7234
to
4245c28
Compare
Oh yeah, |
d8ffdbb
to
fbe8692
Compare
The PR is marked as stale since no activity has been recorded in 30 days |
fbe8692
to
26e22df
Compare
after importing all bundles from the oci directory we go through all containerd images and unpin all images that were imported from bundles that no longer exist on the system. we start now to add the following label when importing: - k0sproject.ocibundle.paths on this label we keep a list of all oci bundles that contain such image and we only unpin it if all the oci bundles were removed from the disk. as now we are unpinning images based on their presence on disk we start to operate also on rename and remove fs events. this commit also address an issue where we could leave a containerd connection opened. Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
- fixed wrong "copyright year". - add error wrap to a function return. - change label name. Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
the previous version of this was way too much optimistic, we better handle other errors that are not of "does not exist" class. Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
if we fail to unpin one image we can keep moving and unpining the others. Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
just checks dates are equal. Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
windows don't seem to be happy if we remove a file without closing it. if you are seeing this commit then it means "yes, windows is not happy about that". if you aren't seeing this comment then the answer is "no, windows does not care about that" but you won't know (except if you already knew). Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
c311817
to
e016733
Compare
Description
after importing all bundles from the oci directory we go through all containerd images and unpin all images that were imported from bundles that no longer exist on the system.
we start now to add the following label when importing:
on this label we keep a list of all oci bundles that contain such image and we only unpin it if all the oci bundles were removed from the disk.
as now we are unpinning images based on their presence on disk we start to operate also on rename and remove fs events.
this commit also address an issue where we could leave a containerd connection opened.
Fixes #4433
Type of change
How Has This Been Tested?
Checklist: