-
Notifications
You must be signed in to change notification settings - Fork 629
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 duplicate image entries in k8s.io namespaces #3744
Conversation
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.
This should be opt-in via a config entry like --kube-hide-dupe
:
https://github.com/containerd/nerdctl/blob/main/docs/config.md
Okay, I'll try to implement it. Initially, I wanted to implement it separately, but this is a preliminary version for the sake of testing and discussion. |
bf3dfaa
to
9851575
Compare
d5c7e2f
to
086f530
Compare
7adb2e8
to
ef8e002
Compare
3c93355
to
57b1f61
Compare
63d6499
to
8da215c
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.
Thanks a lot @fengwei0328
I left a few comments.
7173cb6
to
191cf70
Compare
Maybe we could have an extra test for the following case?
Then
Versus
And confirm that in both cases, all images with that id are correctly removed?
And the same test, this time with wdyt? |
Ok, that's also I do manually every time I'm locally |
Sorry, I definitely meant The point is to verify that force-deleting by short id, and digest, is still working as expected, and will delete images with multiple tags. |
short id and digest tests added |
Thanks a lot @fengwei0328 One last comment on making sure the root test is NoParallel, LGTM otherwise. Then, to maintainers. |
803ce63
to
cc1f568
Compare
The same imageId underk8s.io is showing multiple results: repo:tag, repo:digest, configID. We expect to display only repo:tag, consistent with other namespaces and CRI. e.g. nerdctl -n k8s.io images REPOSITORY TAG IMAGE ID CREATED PLATFORM SIZE BLOB SIZE centos 7 be65f488b776 3 hours ago linux/amd64 211.5 MiB 72.6 MiB centos <none> be65f488b776 3 hours ago linux/amd64 211.5 MiB 72.6 MiB <none> <none> be65f488b776 3 hours ago linux/amd64 211.5 MiB 72.6 MiB expect: nerdctl --kube-hide-dupe -n k8s.io images REPOSITORY TAG IMAGE ID CREATED PLATFORM SIZE BLOB SIZE centos 7 be65f488b776 3 hours ago linux/amd64 211.5 MiB 72.6 MiB Of course, even after deduplicating the images displayed, there are still issues with deleting the images. It is necessary to distinguish between repo:tag and configId, as well as repoDigest. Considering the situation with tags, we need to ensure that all repo:tags under the same imageId are cleaned up before proceeding to clean up the configId and repoDigest. see: containerd#3702 Signed-off-by: fengwei0328 <feng.wei8@zte.com.cn>
Thanks a lot @apostasie |
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.
Thanks
fix3702