containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
8.24k stars 613 forks source link

content digest not found: IPFS not completely fixed #3510

Open apostasie opened 1 month ago

apostasie commented 1 month ago

Description

Somehow there are cases where IPFS.Push will still fail despite layers being ensured.

To investigate.

Steps to reproduce the issue

Hammer the tests

Describe the results you received and expected

=== FAIL: cmd/nerdctl/ipfs TestIPFSCompNoBuild/with (10.29s)
    ipfs_compose_linux_test.go:79: ======================== Pre-test cleanup ========================
    ipfs_compose_linux_test.go:79: ======================== Test setup ========================
    command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test push ipfs://ghcr.io/stargz-containers/wordpress:5.7-org
    command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test push ipfs://ghcr.io/stargz-containers/mariadb:10.5-org
    command.go:112: assertion failed: expect.ExitCode is not result.ExitCode: Expected exit code: 0

        Command:  /usr/local/bin/nerdctl --namespace=nerdctl-test push ipfs://ghcr.io/stargz-containers/mariadb:10.5-org
        ExitCode: 1
        Error:    exit status 1
        Stdout:   
        Stderr:   time="2024-10-07T08:14:30Z" level=info msg="pushing image \"ghcr.io/stargz-containers/mariadb:10.5-org\" to IPFS"
        time="2024-10-07T08:14:30Z" level=info msg="ensuring image contents"
        time="2024-10-07T08:14:35Z" level=warning msg="ipfs push failed" error="content digest sha256:2f2d0a136479bdf78716c96e4cb756e623a0f31b9b29309d975ceaeaa2751f67: not found"
        time="2024-10-07T08:14:35Z" level=fatal msg="content digest sha256:2f2d0a136479bdf78716c96e4cb756e623a0f31b9b29309d975ceaeaa2751f67: not found"

        Env:
        SHELL=/bin/bash
        LOGNAME=rootless
        XDG_SESSION_TYPE=tty
        HOME=/home/rootless
        LANG=C.UTF-8
        SSH_CONNECTION=::1 53392 ::1 22
        XDG_SESSION_CLASS=user
        IPFS_PATH=/home/rootless/.local/share/ipfs
        USER=rootless
        SHLVL=0
        XDG_SESSION_ID=3
        XDG_RUNTIME_DIR=/run/user/1001
        SSH_CLIENT=::1 53392 22
        DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
        OLDPWD=/home/rootless
        PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
        ***
        DOCKER_CONFIG=/tmp/TestIPFSCompNoBuildwith2236295652/001
        IPFS_PATH=/home/rootless/.local/share/ipfs
        NERDCTL_TOML=/tmp/TestIPFSCompNoBuildwith2236295652/001/nerdctl.toml
    case.go:164: ======================== Post-test cleanup ========================

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

apostasie commented 1 month ago

It is a possibility that the problem lies into the ipfs library - as it is calling convert internally.