Skip to content

discard_unpacked_layers=true doesn't work when using ctr #7119

@champtar

Description

@champtar

Description

I'm loading local images into containerd using ctr images load and trying to reduce disk usage
discard_unpacked_layers=true doesn't work when using ctr, only when using the CRI interface.

Steps to reproduce the issue

  1. Start with a containerd without any images
  2. Set discard_unpacked_layers = true
  3. Run ctr images pull docker.io/library/busybox:latest or ctr images load ...

Describe the results you received and expected

file /var/lib/containerd/io.containerd.content.v1.content/blobs/sha256/* should only show ASCII files
All layers should be deleted

What version of containerd are you using?

containerd github.com/containerd/containerd v1.6.6 10c1295

Any other relevant information

Comment from @dcantah on Slack https://cloud-native.slack.com/archives/C4RJZ9Z6Y/p1656625439107119?thread_ts=1656619851.099629&cid=C4RJZ9Z6Y

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions