Skip to content
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

[24.0 backport] Make sure the image is unpacked for the current snapshotter #45678

Merged

Conversation

thaJeztah
Copy link
Member

Switching snapshotter implementations would result in an error when preparing a snapshot, check that the image is indeed unpacked for the current snapshot before trying to prepare a snapshot.

(cherry picked from commit ed32f5e)


- What I did

Changing the snapshotter would result in docker re-pulling the image because the PrepareSnapshot method would return an error. We make sure that the image we want to prepare a snapshot for is indeed unpacked for the current snapshotter before preparing it.

Relates to #45273

- How I did it

- How to verify it

  • start dockerd with the overlayfs snapshotter
  • run an image docker run --rm hello-world
  • restart dockerd and change the snapshotter (use native for example)
  • run docker images, you should see the hello-world image in the list
  • run the image: docker run --rm hello-world, docker should just run the image without re-pulling it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Switching snapshotter implementations would result in an error when
preparing a snapshot, check that the image is indeed unpacked for the
current snapshot before trying to prepare a snapshot.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
(cherry picked from commit ed32f5e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review area/images kind/bugfix PR's that fix bugs containerd-integration Issues and PRs related to containerd integration labels Jun 1, 2023
@thaJeztah thaJeztah added this to the 24.0.3 milestone Jun 1, 2023
@thaJeztah thaJeztah requested review from rumpl and laurazard June 1, 2023 20:53
Copy link
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 4b3329d into moby:24.0 Jun 2, 2023
101 checks passed
@thaJeztah thaJeztah deleted the 24.0_backport_fix_snapshotter_change branch June 2, 2023 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/images containerd-integration Issues and PRs related to containerd integration kind/bugfix PR's that fix bugs status/4-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants