Skip to content

[FIX]: fix issues in rmi code (including #4104 content digest not found) - #4107

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
apostasie:fix-not-found
Apr 16, 2025
Merged

AkihiroSuda merged 1 commit into
containerd:mainfrom
apostasie:fix-not-found

Conversation

@apostasie

@apostasie apostasie commented Apr 15, 2025 •

Copy link
Copy Markdown
Contributor

There are multiple issues with the current code implementation:

  1. it does not honor the --async flag at all - and will always remove (running) images async, never sync
  2. since the image is recreated AFTER we call delete (so that we prevent deletion of the content used by running containers), the code is racy, as (presumably) deletion may or may not have already completed, resulting in the dreaded content digest not found
  3. we create the updated image with name ":" - this unfortunately means that if there is already another unnamed image, containerd will refuse to create it

I do not know how to address point 3 - which I believe is already an issue currently (tracked in #4109).
Note that this patch will change the behavior wrt to this specific aspect. Currently, we fail to create the new image, but still asked for deletion of the old image, which will break things. With this patch, we fail on creation and do not delete the original.

I would still suggest we merge this here if the reviewers are happy with it.
It should fix #4104.

Signed-off-by: apostasie <[email protected]>
@apostasie apostasie changed the title [DEBUGGING]: investigating #4104 Fix rmi code Apr 15, 2025
@apostasie
apostasie marked this pull request as ready for review April 15, 2025 23:12
@apostasie apostasie changed the title Fix rmi code [FIX]: fix issues in rmi code (including content digest not found) Apr 15, 2025
@apostasie apostasie changed the title [FIX]: fix issues in rmi code (including content digest not found) [FIX]: fix issues in rmi code (including #4104 content digest not found) Apr 15, 2025
@AkihiroSuda AkihiroSuda added this to the v2.0.5 milestone Apr 16, 2025

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

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.

[CI]: content digest not found follow-up

2 participants