-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: ryuk no such container / 404 with --selinux-enabled option #7177
Comments
Thanks for raising the issue, Can you try adding |
If you have SELinux enabled in both the OS and Docker, Ryuk does not work because it is unable to connect to the bind-mounted Docker UNIX socket. See https://github.com/mviereck/x11docker/wiki/SELinux for more details. The same issue applies to Podman. For example, you should also be able to see that this command does not work on SELinux-enabled systems:
Running Ryuk as a privileged container works around the issue because privileged containers don't have SELinux isolation. I think Testcontainers should ship with a more fine-grained switch to just disable SELinux for Ryuk (instead of the current one to run Ryuk as a privileged container), or just always unconditionally disable SELinux for Ryuk since AFAICT this is currently the only way to work around this issue (in a sane way). |
This has been fixed in cc60cd2 and it will part of the next release. |
This works but the ryuk container never shuts down, and subsequent tests block until previous ryuk containers are stopped manually. |
which container runtime are you using? I tested it with Docker Desktop for Mac and it works as expected. |
Podman on Fedora 38 |
wonder if there is an issue in Podman about it. Are you using Podman 4.5.x or latest? |
Yes
|
@rocketraman Can you make sure that you have the latest update of systemd installed (currently: There was a bug affecting recent systemd versions such as systemd 253.5 (link, another link) that caused this same behaviour you are observing. |
Thanks for this. I am on 253.5 right now. Will give 253.7 a shot. |
I can confirm that pulling systemd out of the mix by running |
great @rocketraman ! and thanks for sharing @joanbm ! |
Nice! That problem gave me a bit of a headache recently, so I hope you didn't waste too much time on it :) |
Given your timely post @joanbm , I did not! Thanks again. |
Disabling Ryuk worked for me as mentioned here. |
Module
Core
Testcontainers version
1.18.3
Using the latest Testcontainers version?
Yes
Host OS
Linux
Host Arch
x86_64
Docker version
What happened?
On my distro (Fedora CoreOS 38) docker has
--selinux-enabled
by default.When running an integration test I get the error
tc.testcontainers/ryuk:0.5.1 ERROR Could not start containerjava.lang.IllegalStateException: Wait strategy failed. Container is removed
.It took some time to figure out why this was happening. Using
TESTCONTAINERS_RYUK_DISABLED=true
worked around the issue. Removing--selinux-enabled
from the docker daemon also seems to work around the issue.Relevant log output
The text was updated successfully, but these errors were encountered: