Skip to content
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

Display Ryuk logs when it fails to start #4842

Merged
merged 5 commits into from Jan 5, 2022

Conversation

vincz7777
Copy link
Contributor

In an environment with multiple Docker daemons available (typically Jenkins running on a Kubernetes infrastructure), the Ryuk container can pick the wrong Docker socket. This can be fixed by using the TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE environment variable.

However when such an error occurs - which was our case when we upgraded from version 1.14.2 to 1.16.2 of Testcontainers - it can be difficult to debug and understand what the root cause is, as the logs provided only refer to a 404 - No such container error.

We propose to display the logs of the Ryuk container in such a scenario - which are explicit about the docker socket error - so that users can understand faster how to fix their configuration.

@kiview
Copy link
Member

kiview commented Jan 3, 2022

Hey @vincz7777, good point (I regularly see users confused by this error message), and thanks for providing an improvement in this PR 👍

@bsideup bsideup added this to the next milestone Jan 4, 2022
@bsideup
Copy link
Member

bsideup commented Jan 4, 2022

@vincz7777 @kiview I just applied a tiny change to make try {} catch {} smaller and catch more exceptions (just in case), should be good to go once CI is green 👍

@vincz7777
Copy link
Contributor Author

@vincz7777 @kiview I just applied a tiny change to make try {} catch {} smaller and catch more exceptions (just in case), should be good to go once CI is green +1

Hi @bsideup it seems the CI fails on the toxyproxy check. I'm not sure to understand how this could be related to the modifications of the PR. Could you help me on this one? Thanks in advance!

@bsideup
Copy link
Member

bsideup commented Jan 4, 2022

Hi @vincz7777! Seems to be unrelated (flaky test?), I just triggered a re-run 👍

@rnorth
Copy link
Member

rnorth commented Jan 4, 2022

The toxiproxy tests are failing on master too (and I've rerun), so I think we have a problem...

@rnorth rnorth merged commit 3c30a26 into testcontainers:master Jan 5, 2022
@vincz7777 vincz7777 deleted the ryuk-failure-display-logs branch January 5, 2022 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants