Skip to content

integration/container: TestCreateWithCDIDevices: use temp-dir#47925

Draft
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:integration_nits2
Draft

integration/container: TestCreateWithCDIDevices: use temp-dir#47925
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:integration_nits2

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

see individual commits for details

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah thaJeztah added status/2-code-review area/testing kind/refactor PR's that refactor, or clean-up code labels Jun 7, 2024
@thaJeztah thaJeztah self-assigned this Jun 7, 2024
@thaJeztah thaJeztah force-pushed the integration_nits2 branch from 2458bc6 to 61f025a Compare June 7, 2024 13:22
@thaJeztah thaJeztah marked this pull request as draft June 7, 2024 23:48
@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Jun 7, 2024

=== FAIL: amd64.integration.container TestCreateWithCDIDevices (0.64s)
    cdi_test.go:37: assertion failed: error is not nil: Error response from daemon: CDI device injection failed: unresolvable CDI devices vendor1.com/device=foo

Rootless failing because of permissions (due to the t.TempDir() ?)

    daemon.go:317: [d4e5221880a69] + exec dockerd --data-root /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/d4e5221880a69/root --exec-root /tmp/dxr/d4e5221880a69 --pidfile /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/d4e5221880a69/docker.pid --userland-proxy=true --containerd-namespace d4e5221880a69 --containerd-plugins-namespace d4e5221880a69p --host unix:///tmp/docker-integration/d4e5221880a69.sock --debug --storage-driver overlay2 --config-file /tmp/TestCreateWithCDIDevices3680275469/001/daemon.json --cdi-spec-dir=/tmp/TestCreateWithCDIDevices3680275469/001/testdata/cdi
    daemon.go:317: [d4e5221880a69] unable to configure the Docker daemon with file /tmp/TestCreateWithCDIDevices3680275469/001/daemon.json: open /tmp/TestCreateWithCDIDevices3680275469/001/daemon.json: permission denied

@thaJeztah thaJeztah force-pushed the integration_nits2 branch from 61f025a to 6cdcde8 Compare June 8, 2024 21:17
@thaJeztah thaJeztah changed the title integration/container: fix some listing issues, and minor cleanup. integration/container: fix some linting issues, and minor cleanup. Aug 19, 2024
Use a temp-directory instead of the working directory to store
files; this allows for easier cleanup, and makes sure we don't
leave test-files behind.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah changed the title integration/container: fix some linting issues, and minor cleanup. integration/container: TestCreateWithCDIDevices: use temp-dir Apr 22, 2025
@thaJeztah
Copy link
Copy Markdown
Member Author

Boo! Still failing;

=== RUN   TestCreateWithCDIDevices
    daemon.go:334: [dfd38e377ad6c] + return
    daemon.go:334: [dfd38e377ad6c] + rm -f /run/docker /run/containerd /run/xtables.lock
    daemon.go:334: [dfd38e377ad6c] + [ -n  ]
    daemon.go:334: [dfd38e377ad6c] + stat -c %T -f /etc
    daemon.go:334: [dfd38e377ad6c] + [ tmpfs = tmpfs ]
    daemon.go:334: [dfd38e377ad6c] + [ -L /etc/ssl ]
    daemon.go:334: [dfd38e377ad6c] + mount_directory /etc/ssl --rbind
    daemon.go:334: [dfd38e377ad6c] + [ -z 1 ]
    daemon.go:334: [dfd38e377ad6c] + DIRECTORY=/etc/ssl
    daemon.go:334: [dfd38e377ad6c] + [ ! -d /etc/ssl ]
    daemon.go:334: [dfd38e377ad6c] + realpath /etc/ssl
    daemon.go:334: [dfd38e377ad6c] + DIRECTORY_REALPATH=/etc/.ro2386417278/ssl
    daemon.go:334: [dfd38e377ad6c] + MOUNT_OPTIONS=--rbind
    daemon.go:334: [dfd38e377ad6c] + rm -rf /etc/ssl
    daemon.go:334: [dfd38e377ad6c] + mkdir -p /etc/ssl
    daemon.go:334: [dfd38e377ad6c] + mount --rbind /etc/.ro2386417278/ssl /etc/ssl
    daemon.go:334: [dfd38e377ad6c] + exec dockerd --data-root /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/dfd38e377ad6c/root --exec-root /tmp/dxr/dfd38e377ad6c --pidfile /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/dfd38e377ad6c/docker.pid --userland-proxy=true --containerd-namespace dfd38e377ad6c --containerd-plugins-namespace dfd38e377ad6cp --host unix:///tmp/docker-integration/dfd38e377ad6c.sock --debug --storage-driver overlay2 --config-file /tmp/TestCreateWithCDIDevices2509706332/001/daemon.json --cdi-spec-dir=/go/src/github.com/docker/docker/integration/container/testdata/cdi
    daemon.go:334: [dfd38e377ad6c] unable to configure the Docker daemon with file /tmp/TestCreateWithCDIDevices2509706332/001/daemon.json: open /tmp/TestCreateWithCDIDevices2509706332/001/daemon.json: permission denied
    daemon.go:334: [dfd38e377ad6c] [rootlesskit:child ] error: command [/usr/local/bin/dockerd-rootless.sh --data-root /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/dfd38e377ad6c/root --exec-root /tmp/dxr/dfd38e377ad6c --pidfile /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/dfd38e377ad6c/docker.pid --userland-proxy=true --containerd-namespace dfd38e377ad6c --containerd-plugins-namespace dfd38e377ad6cp --host unix:///tmp/docker-integration/dfd38e377ad6c.sock --debug --storage-driver overlay2 --config-file /tmp/TestCreateWithCDIDevices2509706332/001/daemon.json --cdi-spec-dir=/go/src/github.com/docker/docker/integration/container/testdata/cdi] exited: exit status 1
    daemon.go:334: [dfd38e377ad6c] [rootlesskit:parent] error: child exited: exit status 1
    cdi_test.go:35: [dfd38e377ad6c] failed to start daemon with arguments [-u unprivilegeduser --preserve-env --preserve-env=PATH XDG_RUNTIME_DIR=/tmp/xdgrun-dfd38e377ad6c HOME=/home/unprivilegeduser -- dockerd-rootless.sh --data-root /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/dfd38e377ad6c/root --exec-root /tmp/dxr/dfd38e377ad6c --pidfile /go/src/github.com/docker/docker/bundles/test-integration/TestCreateWithCDIDevices/dfd38e377ad6c/docker.pid --userland-proxy=true --containerd-namespace dfd38e377ad6c --containerd-plugins-namespace dfd38e377ad6cp --host unix:///tmp/docker-integration/dfd38e377ad6c.sock --debug --storage-driver overlay2 --config-file /tmp/TestCreateWithCDIDevices2509706332/001/daemon.json --cdi-spec-dir=/go/src/github.com/docker/docker/integration/container/testdata/cdi] : [dfd38e377ad6c] daemon exited during startup: exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant