Description
Similarly to #3489, it seems like there may be another case that was not listed in #3425 - or something having side-effects there, when we rely on a temp-reduced-plaform to push.
It is not entirely clear to me what is going on in there - especially what is happening with the whole reduced-platform contorsions (and why we even need this...) - so, I do not have a quick fix that I can send immediately.
While this was somewhat expected... #3435 (comment) - we should have a hard look at this code.
Steps to reproduce the issue
Hammer the tests.
It took about 20 iterations of
go test ./cmd/nerdctl/images -count 1
to get there.
Note that this was produced with the rewritten tests in #3492.
Describe the results you received and expected
--- FAIL: TestPush (14.40s)
image_push_linux_test.go:253: ======================== Pre-test cleanup ========================
image_push_linux_test.go:253: ======================== Test setup ========================
image_push_linux_test.go:253: ======================== Test Run ========================
image_push_linux_test.go:253: ======================== Processing subtests ========================
--- FAIL: TestPush/with_hosts_dir,_with_login (0.88s)
image_push_linux_test.go:253: ======================== Pre-test cleanup ========================
command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test rmi
image_push_linux_test.go:253: ======================== Test setup ========================
command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test pull ghcr.io/stargz-containers/alpine:3.13-org
command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test tag ghcr.io/stargz-containers/alpine:3.13-org 192.168.5.15:5002/testpush-with-hosts-dir-with-login-a6c55caa:3.13-org
command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test --hosts-dir /tmp/TestPush2005531285/007/certs.d2208102383 login -u admin -p badmin 192.168.5.15:5002
image_push_linux_test.go:253: ======================== Test Run ========================
command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test push --hosts-dir /tmp/TestPush2005531285/007/certs.d2208102383 192.168.5.15:5002/testpush-with-hosts-dir-with-login-a6c55caa:3.13-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 --hosts-dir /tmp/TestPush2005531285/007/certs.d2208102383 192.168.5.15:5002/testpush-with-hosts-dir-with-login-a6c55caa:3.13-org
ExitCode: 1
Error: exit status 1
Stdout: index-sha256:d13219399e61ee5d3c2b411e758d38cf1e1fef0185c74f2ce682205dededc8e0: waiting |--------------------------------------|
elapsed: 0.1 s total: 0.0 B (0.0 B/s)
Stderr: time="2024-10-07T00:59:49-07:00" level=info msg="pushing as a reduced-platform image (application/vnd.docker.distribution.manifest.list.v2+json, sha256:d13219399e61ee5d3c2b411e758d38cf1e1fef0185c74f2ce682205dededc8e0)"
time="2024-10-07T00:59:49-07:00" level=fatal msg="content digest sha256:d13219399e61ee5d3c2b411e758d38cf1e1fef0185c74f2ce682205dededc8e0: not found"
Env:
SHELL=/bin/bash
LOGNAME=dmp
XDG_SESSION_TYPE=tty
HOME=/home/dmp.linux
LANG=C.UTF-8
SSH_CONNECTION=192.168.5.2 51297 192.168.5.15 22
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_SESSION_CLASS=user
TERM=xterm-256color
LESSOPEN=| /usr/bin/lesspipe %s
USER=dmp
SHLVL=2
XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/501
SSH_CLIENT=192.168.5.2 51297 22
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/501/bus
SSH_TTY=/dev/pts/1
OLDPWD=/Users/dmp
_=/usr/local/go/bin/go
PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/sbin:/sbin:/usr/sbin:/sbin:/usr/sbin:/sbin:/usr/local/go/bin
PWD=/Users/dmp/Projects/go/nerd/nerdctl/cmd/nerdctl/image
DOCKER_CONFIG=/tmp/TestPushwith_hosts_dir,_with_login3884284200/001
NERDCTL_TOML=/tmp/TestPushwith_hosts_dir,_with_login3884284200/001/nerdctl.toml
case.go:164: ======================== Post-test cleanup ========================
command.go:112: /usr/local/bin/nerdctl --namespace=nerdctl-test rmi 192.168.5.15:5002/testpush-with-hosts-dir-with-login-a6c55caa:3.13-org
case.go:164: ======================== Post-test cleanup ========================
FAIL
FAIL github.com/containerd/nerdctl/v2/cmd/nerdctl/image 34.020s
FAIL
FAIL
What version of nerdctl are you using?
main
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response
Description
Similarly to #3489, it seems like there may be another case that was not listed in #3425 - or something having side-effects there, when we rely on a temp-reduced-plaform to push.
It is not entirely clear to me what is going on in there - especially what is happening with the whole reduced-platform contorsions (and why we even need this...) - so, I do not have a quick fix that I can send immediately.
While this was somewhat expected... #3435 (comment) - we should have a hard look at this code.
Steps to reproduce the issue
Hammer the tests.
It took about 20 iterations of
to get there.
Note that this was produced with the rewritten tests in #3492.
Describe the results you received and expected
What version of nerdctl are you using?
main
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response