Skip to content

Conversation

@Desiki-high
Copy link

If someone removes the content or snapshot by-pass the cri plugin, cir in-memory metadata think the image exists. When we create sandbox or container, we can't find snapshot and unpack from the content layer with the discard_unpacked_layers CRI config. In that case, we can try fetch the lost image layer to complete create container.

example

  1. use discard_unpacked_layers=true CRI config with overlayfs, pulled OCI images.
  2. change snapshotter to nydus gloablly.
  3. try to create container with pulled OCI image before change sanpshotter.

In that case, we can't find snapshot with nydus sanpshotter. We can't unpack from the content store as well, because we use the discard_unpacked_layers=true config, the layer had discarded. We can try fetching the lost layer when unpacking image to fix this issue.

If someone removes the content or snapshot by-pass the cri plugin, cir in-memory metadata think
the image exists. When we create sandbox or container, we can't find snapshot and unpack from the
content layer with the `discard_unpacked_layers` cri config. In that case, we can try fetch the lost
image layer to complete create container.

Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
When CRI has config `discardUnpackedLayers`, we should allows GC to clean layers up from the content store after unpacking.
Use ctx to notificate unpack image to gc layer content when retry fetch lost layers.

Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
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.

1 participant