Skip to content

Issues running a nydus image, pull works fine but run fails: "ctr: failed to find image ref of snapshot <X>..." #673

@KristoferHansson

Description

@KristoferHansson

I have tried getting nydus snapshotter to work for a while now but yet to be successful, I have posted question in nerdctl github and nydus slack but still not been able to get it to work:

My goal is to verify chunk level deduplication efficiency but I'm still stuck on even getting a first nydus image running

I'm building 5 images, pushing them to a local hosted registry (tested with registry:v2 and zot, running as a container), converting them using nydusify (pull, convert, push). Then in a separate distro I successfully pull the nydus images (using ctr and nerdctl), then when I try to run them it fails.

sudo ./ctr --address /run/containerd/containerd.sock run --rm --snapshotter nydus --platform linux/amd64 --net-host localhost:5000/testimg5-nydusss:nydus test1 sh -c "find / > /dev/null"
WARN[0000] DEPRECATION: The `mirrors` property of `[plugins."io.containerd.grpc.v1.cri".registry]` is deprecated since containerd v1.5 and will be removed in containerd v2.1.Use `config_path` instead.
WARN[0000] DEPRECATION: The `configs` property of `[plugins."io.containerd.grpc.v1.cri".registry]` is deprecated since containerd v1.5 and will be removed in containerd v2.2.Use `config_path` instead.
ctr: failed to find image ref of snapshot 4, labels map[containerd.io/snapshot.ref:sha256:8895493b76342d2901ffa219fa0703f67fd5c3b0e97f686eced3e85809b93362 containerd.io/snapshot/nydus-bootstrap:true containerd.io/snapshot/nydus-fs-version:6]

The snapshotter output:

INFO[2025-09-06T17:59:52.903783581+02:00] [Prepare] snapshot with key default/8/test1 parent default/5/sha256:8895493b76342d2901ffa219fa0703f67fd5c3b0e97f686eced3e85809b93362
DEBU[2025-09-06T17:59:52.907116271+02:00] [Prepare] snapshot with labels map[]          key=default/8/test1 parent="default/5/sha256:8895493b76342d2901ffa219fa0703f67fd5c3b0e97f686eced3e85809b93362"
DEBU[2025-09-06T17:59:52.907191977+02:00] isProxyDriver = false, isProxyLabel = false, isProxyImage = false
INFO[2025-09-06T17:59:52.907218583+02:00] Prepare active Nydus snapshot default/8/test1  key=default/8/test1 parent="default/5/sha256:8895493b76342d2901ffa219fa0703f67fd5c3b0e97f686eced3e85809b93362"
DEBU[2025-09-06T17:59:52.907240878+02:00] Prepare remote snapshot 4                     key=default/8/test1 parent="default/5/sha256:8895493b76342d2901ffa219fa0703f67fd5c3b0e97f686eced3e85809b93362"

note: this generates no additional zot image registry output

looking at the manifest and checking for the existence of the blobs locally shows than only the last blob in the manifest of each image exists locally:

❯ for d in (no_proxy=localhost curl -s http://localhost:5000/v2/testimg5-nydusss/manifests/nydus | jq -r '.layers[].digest' | sed 's/^sha256://')                      sudo ls -lh /var/lib/containerd/io.containerd.content.v1.content/blobs/sha256/$d
  end
ls: cannot access '/var/lib/containerd/io.containerd.content.v1.content/blobs/sha256/98b707aea280e075d94c89676551b8fbd5a6097cfab3f566ebb5b8130c21830b': No such file or directory
ls: cannot access '/var/lib/containerd/io.containerd.content.v1.content/blobs/sha256/cd944a11efae876b5d937e09c8d4542851ddff8726fae4db2084dcc3fa605395': No such file or directory
ls: cannot access '/var/lib/containerd/io.containerd.content.v1.content/blobs/sha256/809abd7a52aca74ff2ac4b297a9396d2a85feffaea2e30f38a74695da858a6e8': No such file or directory
-r--r--r-- 1 root root 216K Sep  6 17:43 /var/lib/containerd/io.containerd.content.v1.content/blobs/sha256/a991aa3a0d6cbfc6a9f8b19a947de52188aa52104cef99fd38999960cb54fe9b

but they exist in the registry:

❯ for d in (no_proxy=localhost curl -s http://localhost:5000/v2/testimg5-nydusss/manifests/nydus | jq -r '.layers[].digest')
          no_proxy=localhost curl -I http://localhost:5000/v2/testimg5-nydusss/blobs/$d
  end
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 10494225
Docker-Content-Digest: sha256:98b707aea280e075d94c89676551b8fbd5a6097cfab3f566ebb5b8130c21830b
Date: Sat, 06 Sep 2025 16:41:47 GMT

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 10494215
Docker-Content-Digest: sha256:cd944a11efae876b5d937e09c8d4542851ddff8726fae4db2084dcc3fa605395
Date: Sat, 06 Sep 2025 16:41:47 GMT

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 32165106
Docker-Content-Digest: sha256:809abd7a52aca74ff2ac4b297a9396d2a85feffaea2e30f38a74695da858a6e8
Date: Sat, 06 Sep 2025 16:41:47 GMT

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 220623
Docker-Content-Digest: sha256:a991aa3a0d6cbfc6a9f8b19a947de52188aa52104cef99fd38999960cb54fe9b
Date: Sat, 06 Sep 2025 16:41:47 GMT

References:
containerd/nerdctl#4495
https://nydusimageservice.slack.com/archives/C01RUGPTP37/p1756467674990349

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions