-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
rake beaker fail when using beaker-docker 0.8.4 in a docker in docker environment #46
Comments
@trevor-vaughan might have some insight here. |
docker info
|
docker inspect of container running beaker
|
Gems installed with bundle install
|
Docker inspect of container running SUT
|
Seems to be a lot of issues around finding the right ip and port to use to talk to the container... "Host to container" "Container to container using hostname (should normally be able to resolv hostname if the containers are on the same docker network)" "Container to container using ip ( the default bridged network does not resolve hostnames ) "Container to container trough gateways as last resort" |
@h-haaks That's not a bad idea 🤔 might have to give that a stab and see how things go. |
Based on the conversation in voxpupuli#46, this attempts to run down a list of 'normal' connections until one can be found. It also pins the fact that you are operating inside of podman. Closes voxpupuli#46
I have never built a gem from source before, but i'll give it a try. |
Ah, its just |
Sorry @trevor-vaughan it does not seem to work...
|
I have also issues with docker-in-docker and beaker trying to connect to the wrong ip/port. I am using a gitlab-runner that spawns a dind container containing ruby and has the DOCKER_HOST variable set to the address of the underlying host system to be able to spawn the SUT containers. This line here assumes that its a remote system and uses the value of DOCKER_HOST, which cannot work as this is not the SUT containers address: beaker-docker/lib/beaker/hypervisor/docker.rb Line 145 in 285dde8
|
I changed my setup to connect via mounted socket to docker, so i do not run into the DOCKER_HOST problem anymore and have now the same issue as @h-haaks. The gem keeps selecting the wrong ip (Gateway IP) to connect to. |
@bastelfreak why did you close this issue? As stated by @h-haaks, this issue is NOT fixed by #47. |
github closed it automatically because I merged #47 :) |
I have a fix that works on my docker-in-docker gitlab runner setup. After that pull request you need to set the variable DOCKER_IN_DOCKER inside your gitlab-ci.yml (or your env directly, if you are not using gitlab) |
@h-haaks could you verify that this also works for you, please? |
Hi @QueerCodingGirl, thanks for letting me know. |
@QueerCodingGirl, I finally got around to test your branch.
|
@QueerCodingGirl, I forgot to add the DOCKER_IN_DOCKER env variable ... |
Great! Now all we need is the review from @trevor-vaughan and a merge. |
This issue has to be opened again... |
Also blocked by this issue after upgrade to version 1.1.1 when using docker in docker. |
We have a Jenkins job configured to run
bundle exec rake beaker
in a docker in docker setup.This started to fail as beaker-docker was updated from 0.8.3 to 0.8.4...
It looks like it is trying to ssh into the docker host on port 22
Using container connection at 172.17.0.1:22
With 0.8.3 it seems to ssh into the SUT ip
Using container connection at 172.17.0.7:22
The text was updated successfully, but these errors were encountered: