Closed muhaook closed 1 month ago
Running Testcontainers together with Podman usually requires additional configurations. It does not run out-of-the-box due to different implementations/behaviors of Podman. It is been a while since I worked on improving support for other container runtimes. I am not sure what changes are necessary today, but maybe this issue helps: https://github.com/testcontainers/testcontainers-dotnet/issues/876. However, in case you make any progress setting up Podman together with Testcontainers (including running Ryuk), some documentation about what is necessary to configure it would be awesome and certainly will help other developers too.
@cristianrgreco did a great job a while ago and spent a lot of time and effort adding much better support to the Node.js implementation ❤️. Perhaps this (https://github.com/testcontainers/testcontainers-node/pull/494) initial PR helps to figure out the necessary configuration too (maybe even improving the .NET out-of-the-box support).
Edit:
This is the branch I started a while ago to run the tests against other container runtimes too. The idea was to run jobs for Docker, Colima, Podman, etc. The install-podman/install.sh
action contains the necessary steps from back then to run it on the pipeline.
Thanks @HofmeisterAn , it started working after running:
systemctl enable --now --user podman.socket
Testcontainers version
3.8.0
Using the latest Testcontainers version?
Yes
Host OS
Linux
Host arch
x86
.NET version
8.0.204
Docker version
Docker info
What happened?
Container testcontainers/ryuk:0.6.0 failed to start with exception: Unhandled exception. DotNet.Testcontainers.Containers.ResourceReaperException: Initialization has been cancelled
Relevant log output
Additional information
system messages about podman:
[root@apmp012 log]# tail -f messages May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="IdleTracker:closed 1m+0h/38t connection(s)" X-Reference-Id=0xc00041a128 May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="IdleTracker:new 0m+0h/38t connection(s)" X-Reference-Id=0xc00092a638 May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="IdleTracker:active 0m+0h/39t connection(s)" X-Reference-Id=0xc00092a638 May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="Looking up image \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" in local containers storage" May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="Trying \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" ..." May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="parsed reference into \"[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.mountopt=nodev,metacopy=on]@71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\"" May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="Found image \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" as \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" in local containers storage" May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="Found image \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" as \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" in local containers storage ([overlay@/var/lib/containers/storage+/run/containers/storage:overlay.mountopt=nodev,metacopy=on]@71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130)" May 15 07:53:38 apmp012 podman[342275]: 127.0.0.1 - - [15/May/2024:07:53:38 +0000] "GET /containers/7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa/json HTTP/1.1" 200 5061 "" "Docker.DotNet tc-dotnet/3.8.0+14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8" May 15 07:53:38 apmp012 podman[342275]: time="2024-05-15T07:53:38Z" level=debug msg="IdleTracker:closed 1m+0h/39t connection(s)" X-Reference-Id=0xc00092a638
May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="IdleTracker:new 0m+0h/39t connection(s)" X-Reference-Id=0xc00041a138 May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="IdleTracker:active 0m+0h/40t connection(s)" X-Reference-Id=0xc00041a138 May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Looking up image \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" in local containers storage" May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Trying \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" ..." May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="parsed reference into \"[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.mountopt=nodev,metacopy=on]@71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\"" May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Found image \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" as \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" in local containers storage" May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Found image \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" as \"71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130\" in local containers storage ([overlay@/var/lib/containers/storage+/run/containers/storage:overlay.mountopt=nodev,metacopy=on]@71009a3edde7c6988eb3a3b51c9dc3cacc154494ca7e5e33ed567a38bf75c130)" May 15 07:54:38 apmp012 podman[342275]: 127.0.0.1 - - [15/May/2024:07:54:38 +0000] "GET /containers/7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa/json HTTP/1.1" 200 5061 "" "Docker.DotNet tc-dotnet/3.8.0+14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8" May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="IdleTracker:closed 1m+0h/40t connection(s)" X-Reference-Id=0xc00041a138 May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="IdleTracker:new 0m+0h/40t connection(s)" X-Reference-Id=0xc00092a648 May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="IdleTracker:active 0m+0h/41t connection(s)" X-Reference-Id=0xc00092a648 May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Starting parallel job on container 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa" May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Stopping ctr 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa (timeout 15)" May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Stopping container 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa (PID 342819)" May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Sending signal 15 to container 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa" May 15 07:54:38 apmp012 conmon[342816]: conmon 7d9e658d6a55f3c2bdbc: container 342819 exited with status 2
May 15 07:54:38 apmp012 systemd[1]: libpod-7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa.scope: Deactivated successfully.
May 15 07:54:38 apmp012 podman[342275]: 2024-05-15 07:54:38.798371604 +0000 UTC m=+1122.356596389 container died 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa (image=ghcr.io/muhaook/testcontainers/ryuk:0.6.0, name=testcontainers-ryuk-a95fc84f-cb82-4b4e-83cd-e4d68016574f, org.testcontainers.lang=dotnet, org.testcontainers.resource-reaper-session=00000000-0000-0000-0000-000000000000, org.testcontainers.ryuk=true, org.testcontainers.session-id=a95fc84f-cb82-4b4e-83cd-e4d68016574f, org.testcontainers.version=3.8.0+14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8, org.testcontainers=true)
May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Container \"7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa\" state changed from \"stopping\" to \"stopped\" while waiting for it to be stopped: discontinuing stop procedure as another process interfered"
May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Cleaning up container 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa"
May 15 07:54:38 apmp012 podman[342275]: time="2024-05-15T07:54:38Z" level=debug msg="Tearing down network namespace at /run/netns/netns-9d522106-0cc2-5b90-0ffc-94142349f98c for container 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa"
May 15 07:54:38 apmp012 podman[342848]: [DEBUG netavark::commands::teardown] "Tearing down.."
May 15 07:54:38 apmp012 podman[342848]: [INFO netavark::firewall] Using iptables firewall driver
May 15 07:54:38 apmp012 kernel: podman0: port 2(veth1) entered disabled state
May 15 07:54:38 apmp012 /usr/bin/podman[342842]: time="2024-05-15T07:54:38Z" level=info msg="Using boltdb as database backend"
May 15 07:54:38 apmp012 /usr/bin/podman[342842]: time="2024-05-15T07:54:38Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled"
May 15 07:54:38 apmp012 /usr/bin/podman[342842]: time="2024-05-15T07:54:38Z" level=info msg="Setting parallel job count to 13"
May 15 07:54:38 apmp012 kernel: device veth1 left promiscuous mode
May 15 07:54:38 apmp012 kernel: podman0: port 2(veth1) entered disabled state
May 15 07:54:39 apmp012 podman[342848]: [DEBUG netavark::commands::teardown] "Teardown complete"
May 15 07:54:39 apmp012 systemd[1]: run-netns-netns\x2d9d522106\x2d0cc2\x2d5b90\x2d0ffc\x2d94142349f98c.mount: Deactivated successfully.
May 15 07:54:39 apmp012 podman[342275]: time="2024-05-15T07:54:39Z" level=debug msg="Successfully cleaned up container 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa"
May 15 07:54:39 apmp012 systemd[1]: scratch-podman-storage-overlay\x2dcontainers-7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa-userdata-shm.mount: Deactivated successfully.
May 15 07:54:39 apmp012 systemd[1]: var-lib-containers-storage-overlay\x2dcontainers-7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa-userdata-shm.mount: Deactivated successfully.
May 15 07:54:39 apmp012 podman[342275]: time="2024-05-15T07:54:39Z" level=debug msg="Unmounted container \"7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa\""
May 15 07:54:39 apmp012 systemd[1]: var-lib-containers-storage-overlay-aaaaa75a8aecb3cf9beb64ab88feb44c708c1b49fae912c6a5d5accf084d092f-merged.mount: Deactivated successfully.
May 15 07:54:39 apmp012 podman[342275]: 2024-05-15 07:54:39.040109191 +0000 UTC m=+1122.598333957 container cleanup 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa (image=ghcr.io/muhaook/testcontainers/ryuk:0.6.0, name=testcontainers-ryuk-a95fc84f-cb82-4b4e-83cd-e4d68016574f, org.testcontainers.version=3.8.0+14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8, org.testcontainers=true, org.testcontainers.lang=dotnet, org.testcontainers.resource-reaper-session=00000000-0000-0000-0000-000000000000, org.testcontainers.ryuk=true, org.testcontainers.session-id=a95fc84f-cb82-4b4e-83cd-e4d68016574f)
May 15 07:54:39 apmp012 podman[342275]: 127.0.0.1 - - [15/May/2024:07:54:38 +0000] "POST /containers/7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa/stop?t=15 HTTP/1.1" 204 0 "" "Docker.DotNet tc-dotnet/3.8.0+14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8"
May 15 07:54:39 apmp012 podman[342275]: time="2024-05-15T07:54:39Z" level=debug msg="IdleTracker:closed 1m+0h/41t connection(s)" X-Reference-Id=0xc00092a648
May 15 07:54:39 apmp012 podman[342275]: time="2024-05-15T07:54:39Z" level=debug msg="IdleTracker:new 0m+0h/41t connection(s)" X-Reference-Id=0xc00041a6a8
May 15 07:54:39 apmp012 podman[342275]: time="2024-05-15T07:54:39Z" level=debug msg="IdleTracker:active 0m+0h/42t connection(s)" X-Reference-Id=0xc00041a6a8
May 15 07:54:39 apmp012 podman[342842]: 2024-05-15 07:54:39.049876853 +0000 UTC m=+0.251262571 container remove 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa (image=ghcr.io/muhaook/testcontainers/ryuk:0.6.0, name=testcontainers-ryuk-a95fc84f-cb82-4b4e-83cd-e4d68016574f, org.testcontainers.version=3.8.0+14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8, org.testcontainers=true, org.testcontainers.lang=dotnet, org.testcontainers.resource-reaper-session=00000000-0000-0000-0000-000000000000, org.testcontainers.ryuk=true, org.testcontainers.session-id=a95fc84f-cb82-4b4e-83cd-e4d68016574f)
May 15 07:54:39 apmp012 podman[342275]: time="2024-05-15T07:54:39Z" level=info msg="Request Failed(Internal Server Error): container 7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa does not exist in database: no such container"
May 15 07:54:39 apmp012 podman[342275]: 127.0.0.1 - - [15/May/2024:07:54:39 +0000] "GET /containers/7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa/json HTTP/1.1" 500 178 "" "Docker.DotNet tc-dotnet/3.8.0+14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8"
May 15 07:54:39 apmp012 podman[342275]: time="2024-05-15T07:54:39Z" level=debug msg="IdleTracker:closed 1m+0h/42t connection(s)" X-Reference-Id=0xc00041a6a8
May 15 07:54:39 apmp012 systemd[1]: libpod-conmon-7d9e658d6a55f3c2bdbcf6e03ba861cebbddec047d0cebca98f9a4af0a070bfa.scope: Deactivated successfully.
May 15 07:54:55 apmp012 systemd[1]: ade_autofs-ade_infra.mount: Deactivated successfully.