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

rake beaker fail when using beaker-docker 0.8.4 in a docker in docker environment #46

Open
h-haaks opened this issue Mar 25, 2021 · 24 comments · Fixed by #47 or #51
Open

rake beaker fail when using beaker-docker 0.8.4 in a docker in docker environment #46

h-haaks opened this issue Mar 25, 2021 · 24 comments · Fixed by #47 or #51

Comments

@h-haaks
Copy link

h-haaks commented Mar 25, 2021

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

11:33:18  TEST_TIERS env variable not defined. Defaulting to run all tests.
11:33:18  /home/jenkins/.rbenv/versions/2.5.3/bin/ruby -I/home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib:/home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-support-3.10.2/lib /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/exe/rspec spec/acceptance
11:33:20  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-rspec-6.3.0/lib/beaker-rspec/helpers/serverspec.rb:43: warning: already initialized constant Module::VALID_OPTIONS_KEYS
11:33:20  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/specinfra-2.82.2/lib/specinfra/configuration.rb:4: warning: previous definition of VALID_OPTIONS_KEYS was here
11:33:20  Hypervisor for centos-7-x64 is docker
11:33:20  Beaker::Hypervisor, found some docker boxes to create
11:33:20  Provisioning docker
11:33:20  provisioning centos-7-x64
11:33:20  Creating image
11:33:20  Dockerfile is         FROM centos:7
11:33:20          ENV container docker
11:33:20  RUN yum clean all
11:33:20  RUN yum install -y sudo openssh-server openssh-clients curl ntpdate
11:33:20  RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
11:33:20  RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
11:33:20  RUN sed 's@session *required *pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*
11:33:20  RUN mkdir -p /var/run/sshd
11:33:20  RUN echo root:root | chpasswd
11:33:20  RUN sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
11:33:20  RUN sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
11:33:20  RUN sed -ri 's/^#?UseDNS .*/UseDNS no/' /etc/ssh/sshd_config
11:33:20  RUN yum install -y epel-release
11:33:20  RUN yum install -y iproute java-1.8.0-openjdk unzip wget which awk jq
11:33:20          EXPOSE 22
11:33:20          CMD ["/usr/sbin/init"]
11:33:20  Docker build buildargs: {}
11:33:20  post
11:33:20  /build
11:33:20  {:rm=>true, :buildargs=>"{}"}
11:33:20  Dockerfile0000640000000000000000000000141414027063357013313 0ustar00wheelwheel00000000000000        FROM centos:7
11:33:20          ENV container docker
11:33:20  RUN yum clean all
11:33:20  RUN yum install -y sudo openssh-server openssh-clients curl ntpdate
11:33:20  RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
11:33:20  RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
11:33:20  RUN sed 's@session *required *pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*
11:33:20  RUN mkdir -p /var/run/sshd
11:33:20  RUN echo root:root | chpasswd
11:33:20  RUN sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
11:33:20  RUN sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
11:33:20  RUN sed -ri 's/^#?UseDNS .*/UseDNS no/' /etc/ssh/sshd_config
11:33:20  RUN yum install -y epel-release
11:33:20  RUN yum install -y iproute java-1.8.0-openjdk unzip wget which awk jq
11:33:20          EXPOSE 22
11:33:20          CMD ["/usr/sbin/init"]
11:33:20  
11:33:20  Creating container from image 0fabfb43f0d8
11:33:20  post
11:33:20  /containers/create
11:33:20  {"name"=>"beaker-centos-7-x64-f5415fab2076"}
11:33:20  {"Image":"0fabfb43f0d8","Hostname":"centos-7-x64","HostConfig":{"PortBindings":{"22/tcp":[{"HostPort":"1262","HostIp":"0.0.0.0"}]},"PublishAllPorts":true,"RestartPolicy":{"Name":"always"},"Privileged":true}}
11:33:20  get
11:33:20  /containers/b3cd06788404a0d0891d0ae83156d3aad65ca5a940b81d6cb62148e087fbc089/json
11:33:20  {}
11:33:20  
11:33:20  get
11:33:20  /info
11:33:20  {}
11:33:20  
11:33:20  Starting container b3cd06788404a0d0891d0ae83156d3aad65ca5a940b81d6cb62148e087fbc089
11:33:20  post
11:33:20  /containers/b3cd06788404a0d0891d0ae83156d3aad65ca5a940b81d6cb62148e087fbc089/start
11:33:20  {}
11:33:20  {}
11:33:20  get
11:33:20  /containers/b3cd06788404a0d0891d0ae83156d3aad65ca5a940b81d6cb62148e087fbc089/stats
11:33:20  {:stream=>0}
11:33:20  
11:33:22  get
11:33:22  /containers/b3cd06788404a0d0891d0ae83156d3aad65ca5a940b81d6cb62148e087fbc089/json
11:33:22  {}
11:33:22  
11:33:22  Using container connection at 172.17.0.1:22
11:33:22  node available as ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@172.17.0.1 -p 22
11:33:22  get
11:33:22  /containers/b3cd06788404a0d0891d0ae83156d3aad65ca5a940b81d6cb62148e087fbc089/json
11:33:22  {}
11:33:22  
11:33:22  
11:33:22  centos-7-x64 11:33:21$ cat /etc/resolv.conf
11:33:22    Attempting ssh connection to 172.17.0.1, user: root, opts: {:password=>"root", :port=>"22", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}
11:33:25  root@172.17.0.1's password:Inappropriate ioctl for device
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh/prompt.rb:45:in `noecho'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh/prompt.rb:45:in `ask'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh/authentication/methods/password.rb:68:in `ask_password'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh/authentication/methods/password.rb:21:in `authenticate'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh/authentication/session.rb:86:in `block in authenticate'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh/authentication/session.rb:72:in `each'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh/authentication/session.rb:72:in `authenticate'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/net-ssh-6.1.0/lib/net/ssh.rb:255:in `start'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/ssh_connection.rb:81:in `connect_block'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/ssh_connection.rb:111:in `connect'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/ssh_connection.rb:43:in `connect'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host.rb:302:in `connection'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host.rb:362:in `block (2 levels) in exec'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/logger.rb:239:in `with_indent'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host.rb:361:in `block in exec'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host.rb:360:in `exec'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host_prebuilt_steps.rb:292:in `get_domain_name'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host_prebuilt_steps.rb:392:in `block in hack_etc_hosts'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host_prebuilt_steps.rb:389:in `each'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/host_prebuilt_steps.rb:389:in `hack_etc_hosts'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-docker-0.8.4/lib/beaker/hypervisor/docker.rb:337:in `provision'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/hypervisor.rb:37:in `create'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/network_manager.rb:72:in `block in provision'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/network_manager.rb:71:in `each_key'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-4.26.0/lib/beaker/network_manager.rb:71:in `provision'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-rspec-6.3.0/lib/beaker-rspec/beaker_shim.rb:35:in `provision'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-rspec-6.3.0/lib/beaker-rspec/spec_helper.rb:57:in `block in <top (required)>'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core.rb:98:in `configure'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-rspec-6.3.0/lib/beaker-rspec/spec_helper.rb:5:in `<top (required)>'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-rspec-6.3.0/lib/beaker-rspec.rb:5:in `require'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-rspec-6.3.0/lib/beaker-rspec.rb:5:in `<module:BeakerRSpec>'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/beaker-rspec-6.3.0/lib/beaker-rspec.rb:1:in `<top (required)>'
11:33:25  /home/jenkins/workspace/_test-versjoner-av-beaker-docker/spec/spec_helper_acceptance.rb:7:in `require'
11:33:25  /home/jenkins/workspace/_test-versjoner-av-beaker-docker/spec/spec_helper_acceptance.rb:7:in `<top (required)>'
11:33:25  /home/jenkins/workspace/_test-versjoner-av-beaker-docker/spec/acceptance/01_am__client_spec.rb:1:in `require'
11:33:25  /home/jenkins/workspace/_test-versjoner-av-beaker-docker/spec/acceptance/01_am__client_spec.rb:1:in `<top (required)>'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2112:in `load'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2112:in `load_file_handling_errors'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1615:in `block in load_spec_files'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1613:in `each'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1613:in `load_spec_files'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:102:in `setup'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:86:in `run'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/exe/rspec:4:in `<main>'
11:33:25  /home/jenkins/.rbenv/versions/2.5.3/bin/ruby -I/home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/lib:/home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-support-3.10.2/lib /home/jenkins/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rspec-core-3.10.1/exe/rspec spec/acceptance failed

@genebean
Copy link
Contributor

@trevor-vaughan might have some insight here.

@h-haaks
Copy link
Author

h-haaks commented Mar 25, 2021

docker info

Client:
 Debug Mode: false

Server:
 Containers: 12
  Running: 8
  Paused: 0
  Stopped: 4
 Images: 248
 Server Version: 19.03.13
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 3.10.0-1160.15.2.el7.x86_64
 Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 46.99GiB
 Name: jen16t.spk.no
 ID: IFED:BS3D:YCZX:GNRM:TTV4:XTY5:CC4S:M3R4:HWYE:3ZUA:CVPX:QF7S
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  dockerhub.spk.no:5000
  old-dockerhub.spk.no:5000
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: API is accessible on http://0.0.0.0:2375 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

@h-haaks
Copy link
Author

h-haaks commented Mar 25, 2021

docker inspect of container running beaker

[
    {
        "Id": "978106385e2bfe70ed9d43bf298435dfc3fceb25c6574252664d016d5ad7f69e",
        "Created": "2021-03-25T13:28:37.525168336Z",
        "Path": "cat",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 61669,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2021-03-25T13:28:37.868763384Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:0a3afa3ca6aefa75ae03d6f4e353eb941a9dbbaa5c589a7c172fd671fdc0c0f7",
        "ResolvConfPath": "/var/lib/docker/containers/978106385e2bfe70ed9d43bf298435dfc3fceb25c6574252664d016d5ad7f69e/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/978106385e2bfe70ed9d43bf298435dfc3fceb25c6574252664d016d5ad7f69e/hostname",
        "HostsPath": "/var/lib/docker/containers/978106385e2bfe70ed9d43bf298435dfc3fceb25c6574252664d016d5ad7f69e/hosts",
        "LogPath": "/var/lib/docker/containers/978106385e2bfe70ed9d43bf298435dfc3fceb25c6574252664d016d5ad7f69e/978106385e2bfe70ed9d43bf298435dfc3fceb25c6574252664d016d5ad7f69e-json.log",
        "Name": "/awesome_austin",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "max-file": "2",
                    "max-size": "100m"
                }
            },
            "NetworkMode": "default",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [
                "4a1abe7caf156425c61160c048c4bed92fc2c9e8b4915a19d7f62aac992b8a76"
            ],
            "CapAdd": null,
            "CapDrop": null,
            "Capabilities": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/02682e220a32eda8850b67a32bf960375ae621f7dd62534954252b5958779288-init/diff:/var/lib/docker/overlay2/ba0f4c46d6f07a36cfa738e61195f341fb7b6e01090afefe38f8d8f43845bf08/diff:/var/lib/docker/overlay2/b427b85f138fb07d6524ca3b89d0119454f1828f3d7cff3a6f44f456f5223b25/diff:/var/lib/docker/overlay2/638b7455d3fdf9ac70f0b196c5c5739f5dbb426884dfae356536bc2c42524c47/diff:/var/lib/docker/overlay2/58baf4cd64c9b7068985119873187ed63491c065cb91d064346158f59847fa67/diff:/var/lib/docker/overlay2/8c288be28a524156d8e39436a3976a6a9b1a4a5f881e800aa17034ca6fc35638/diff:/var/lib/docker/overlay2/cdfa02bdda0280b650ac8bc4c6e8520bd9662af7a3ac7887f456626fd3afca5e/diff:/var/lib/docker/overlay2/a6e83b10b5ef7fb2ac1b59fe12cd9288df4ae503b65b14ebcfc7f56be5878dcb/diff:/var/lib/docker/overlay2/f93076f0e99dc1a7ac636e12f6ca2363ef81fa56d55d207752cb79aa9cd8af43/diff:/var/lib/docker/overlay2/ba42c723599d59790d49e33b7a50b24c4dc0c94392ae2c2d5c3081033eeca1a5/diff",
                "MergedDir": "/var/lib/docker/overlay2/02682e220a32eda8850b67a32bf960375ae621f7dd62534954252b5958779288/merged",
                "UpperDir": "/var/lib/docker/overlay2/02682e220a32eda8850b67a32bf960375ae621f7dd62534954252b5958779288/diff",
                "WorkDir": "/var/lib/docker/overlay2/02682e220a32eda8850b67a32bf960375ae621f7dd62534954252b5958779288/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "60d739e4b2092e23a8e9f68b7769b6156a5a197b527ef0fa782dcd0f329bbcdb",
                "Source": "/var/lib/docker/volumes/60d739e4b2092e23a8e9f68b7769b6156a5a197b527ef0fa782dcd0f329bbcdb/_data",
                "Destination": "/home/jenkins/.jenkins",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "volume",
                "Name": "9c49c4d1b6d2b10082fe30ab0dea994047c61b94ffee1b9c62c7a89a142b7631",
                "Source": "/var/lib/docker/volumes/9c49c4d1b6d2b10082fe30ab0dea994047c61b94ffee1b9c62c7a89a142b7631/_data",
                "Destination": "/home/jenkins/agent",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "/etc/localtime",
                "Destination": "/etc/localtime",
                "Mode": "",
                "RW": false,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/etc/ssh/ssh_known_hosts",
                "Destination": "/etc/ssh/ssh_known_hosts",
                "Mode": "",
                "RW": false,
                "Propagation": "rprivate"
            },
            {
                "Type": "volume",
                "Name": "e867b24cb21f15b8ea3876557b370b3412d1ab0d86a8818143a4d2b2dd5cb229",
                "Source": "/var/lib/docker/volumes/e867b24cb21f15b8ea3876557b370b3412d1ab0d86a8818143a4d2b2dd5cb229/_data",
                "Destination": "/home/jenkins/workspace",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "978106385e2b",
            "Domainname": "",
            "User": "1000:1000",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": true,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "CLASSPATH=",
                "EXECUTOR_NUMBER=0",
                "HUDSON_SERVER_COOKIE=bd9fbac459d02b5a",
                "RUN_TESTS_DISPLAY_URL=http://jenkins.spk.no/job/forgerock_am/job/test-versjoner-av-beaker-docker/10/display/redirect?page=tests",
                "BUILD_URL=http://jenkins.spk.no/job/forgerock_am/job/test-versjoner-av-beaker-docker/10/",
                "JENKINS_HOME=/var/lib/jenkins",
                "JENKINS_NODE_COOKIE=60f194d7-ace6-4f6e-ae29-416028629c65",
                "JOB_NAME=forgerock_am/test-versjoner-av-beaker-docker",
                "RUN_DISPLAY_URL=http://jenkins.spk.no/job/forgerock_am/job/test-versjoner-av-beaker-docker/10/display/redirect",
                "JENKINS_SERVER_COOKIE=bd9fbac459d02b5a",
                "STAGE_NAME=Acceptancetesting AM 5.5.1 on centos-7/tomcat 8.0.53 with puppet5",
                "BRANCH_NAME=test-versjoner-av-beaker-docker",
                "BUILD_ID=10",
                "BUILD_NUMBER=10",
                "BUILD_TAG=jenkins-forgerock_am-test-versjoner-av-beaker-docker-10",
                "TERM=xterm",
                "WORKSPACE=/home/jenkins/workspace/_test-versjoner-av-beaker-docker",
                "HUDSON_URL=http://jenkins.spk.no/",
                "JOB_URL=http://jenkins.spk.no/job/forgerock_am/job/test-versjoner-av-beaker-docker/",
                "NODE_LABELS=docker gen-spk-config jen16t-docker",
                "JENKINS_URL=http://jenkins.spk.no/",
                "RUN_ARTIFACTS_DISPLAY_URL=http://jenkins.spk.no/job/forgerock_am/job/test-versjoner-av-beaker-docker/10/display/redirect?page=artifacts",
                "RUN_CHANGES_DISPLAY_URL=http://jenkins.spk.no/job/forgerock_am/job/test-versjoner-av-beaker-docker/10/display/redirect?page=changes",
                "BUILD_DISPLAY_NAME=#10",
                "JOB_BASE_NAME=test-versjoner-av-beaker-docker",
                "JOB_DISPLAY_URL=http://jenkins.spk.no/job/forgerock_am/job/test-versjoner-av-beaker-docker/display/redirect",
                "library.spk-jenkins-lib.version=master",
                "NODE_NAME=jen16t-docker",
                "HUDSON_HOME=/var/lib/jenkins",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=en_US.UTF-8",
                "LANGUAGE=en_US:en",
                "LC_ALL=en_US.UTF-8",
                "HOME=/home/jenkins"
            ],
            "Cmd": [
                "cat"
            ],
            "Image": "old-dockerhub.spk.no:5000/puppet-module-build/master",
            "Volumes": null,
            "WorkingDir": "/home/jenkins/workspace/_test-versjoner-av-beaker-docker",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "maintainer": "Hugo Haakseth <hugo.haakseth@spk.no>",
                "no.spk.build-date": "1574121634833",
                "no.spk.jenkins.build-number": "7",
                "no.spk.vcs-ref": "c850adcaa06dda372fe0f33a776ade1e99a39abf",
                "org.label-schema.build-date": "20191001",
                "org.label-schema.license": "GPLv2",
                "org.label-schema.name": "CentOS Base Image",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.vendor": "CentOS"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "1cdef8284e70a028f259511ee56993b5aed514823adcb797fd48d508cb413667",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/1cdef8284e70",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "072f69605369a06d3c74bc2735d51c8797016e4a556ba704f73a59f0eb2734b4",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.5",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:05",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "a5ab7055d0be2c4e29bd34f3dc3a7631dcbd53aaaeb6ac4690c3e0d0545978b3",
                    "EndpointID": "072f69605369a06d3c74bc2735d51c8797016e4a556ba704f73a59f0eb2734b4",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.5",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:05",
                    "DriverOpts": null
                }
            }
        }
    }
]

@h-haaks
Copy link
Author

h-haaks commented Mar 25, 2021

Gems installed with bundle install

14:28:44  Fetching gem metadata from https://rubygems.org/.......
14:28:44  Fetching gem metadata from https://rubygems.org/.
14:28:48  Resolving dependencies..........................................
14:28:48  Fetching rake 12.3.3
14:28:48  Installing rake 12.3.3
14:28:48  Fetching public_suffix 4.0.6
14:28:48  Installing public_suffix 4.0.6
14:28:48  Fetching addressable 2.7.0
14:28:48  Installing addressable 2.7.0
14:28:48  Fetching ansi 1.5.0
14:28:48  Installing ansi 1.5.0
14:28:48  Fetching ast 2.4.2
14:28:48  Installing ast 2.4.2
14:28:48  Fetching awesome_print 1.9.2
14:28:49  Installing awesome_print 1.9.2
14:28:49  Fetching bcrypt_pbkdf 1.1.0
14:28:49  Installing bcrypt_pbkdf 1.1.0 with native extensions
14:28:50  Fetching deep_merge 1.2.1
14:28:50  Installing deep_merge 1.2.1
14:28:50  Fetching stringify-hash 0.0.2
14:28:50  Installing stringify-hash 0.0.2
14:28:50  Fetching beaker-hostgenerator 1.2.10
14:28:50  Installing beaker-hostgenerator 1.2.10
14:28:50  Fetching hocon 1.3.1
14:28:50  Installing hocon 1.3.1
14:28:50  Fetching in-parallel 0.1.17
14:28:50  Installing in-parallel 0.1.17
14:28:50  Fetching inifile 3.0.0
14:28:50  Installing inifile 3.0.0
14:28:50  Fetching minitar 0.9
14:28:50  Installing minitar 0.9
14:28:50  Fetching minitest 5.14.4
14:28:50  Installing minitest 5.14.4
14:28:50  Fetching net-ssh 6.1.0
14:28:50  Installing net-ssh 6.1.0
14:28:51  Fetching net-scp 1.2.1
14:28:51  Installing net-scp 1.2.1
14:28:51  Fetching open_uri_redirections 0.2.1
14:28:51  Installing open_uri_redirections 0.2.1
14:28:51  Fetching byebug 11.1.3
14:28:51  Installing byebug 11.1.3 with native extensions
14:28:52  Fetching coderay 1.1.3
14:28:52  Installing coderay 1.1.3
14:28:52  Fetching method_source 0.8.2
14:28:52  Installing method_source 0.8.2
14:28:52  Fetching slop 3.6.0
14:28:52  Installing slop 3.6.0
14:28:52  Fetching pry 0.10.4
14:28:52  Installing pry 0.10.4
14:28:53  Fetching pry-byebug 3.8.0
14:28:53  Installing pry-byebug 3.8.0
14:28:53  Fetching rb-readline 0.5.5
14:28:53  Installing rb-readline 0.5.5
14:28:53  Fetching rsync 1.0.9
14:28:53  Installing rsync 1.0.9
14:28:53  Fetching thor 1.1.0
14:28:53  Installing thor 1.1.0
14:28:53  Fetching beaker 4.26.0
14:28:53  Installing beaker 4.26.0
14:28:54  Fetching colorize 0.8.1
14:28:54  Installing colorize 0.8.1
14:28:54  Fetching highline 2.0.3
14:28:54  Installing highline 2.0.3
14:28:54  Fetching commander 4.5.2
14:28:54  Installing commander 4.5.2
14:28:54  Fetching multipart-post 2.1.1
14:28:54  Installing multipart-post 2.1.1
14:28:54  Fetching faraday 0.17.4
14:28:54  Installing faraday 0.17.4
14:28:54  Fetching vmfloaty 1.1.1
14:28:54  Installing vmfloaty 1.1.1
14:28:54  Fetching beaker-abs 0.8.1
14:28:54  Installing beaker-abs 0.8.1
14:28:54  Fetching require_all 1.3.3
14:28:54  Installing require_all 1.3.3
14:28:54  Fetching beaker-answers 0.28.0
14:28:54  Installing beaker-answers 0.28.0
14:28:54  Fetching excon 0.79.0
14:28:54  Installing excon 0.79.0
14:28:55  Fetching multi_json 1.15.0
14:28:55  Installing multi_json 1.15.0
14:28:55  Fetching docker-api 2.1.0
14:28:55  Installing docker-api 2.1.0
14:28:55  Fetching beaker-docker 0.8.4
14:28:55  Installing beaker-docker 0.8.4
14:28:55  Fetching beaker-module_install_helper 0.1.7
14:28:55  Installing beaker-module_install_helper 0.1.7
14:28:55  Fetching ruby-ll 2.1.2
14:28:55  Installing ruby-ll 2.1.2 with native extensions
14:28:56  Fetching oga 3.3
14:28:56  Installing oga 3.3 with native extensions
14:28:57  Fetching beaker-puppet 1.21.0
14:28:57  Installing beaker-puppet 1.21.0
14:28:57  Fetching beaker-vmpooler 1.3.3
14:28:57  Installing beaker-vmpooler 1.3.3
14:28:57  Fetching beaker-pe 2.11.11
14:28:58  Installing beaker-pe 2.11.11
14:28:58  Fetching beaker-puppet_install_helper 0.9.8
14:28:58  Installing beaker-puppet_install_helper 0.9.8
14:28:58  Fetching rspec-support 3.10.2
14:28:58  Installing rspec-support 3.10.2
14:28:58  Fetching rspec-core 3.10.1
14:28:58  Installing rspec-core 3.10.1
14:28:58  Fetching diff-lcs 1.4.4
14:28:58  Installing diff-lcs 1.4.4
14:28:58  Fetching rspec-expectations 3.10.1
14:28:58  Installing rspec-expectations 3.10.1
14:28:58  Fetching rspec-mocks 3.10.2
14:28:58  Installing rspec-mocks 3.10.2
14:28:58  Fetching rspec 3.10.0
14:28:58  Installing rspec 3.10.0
14:28:58  Fetching rspec-its 1.3.0
14:28:58  Installing rspec-its 1.3.0
14:28:58  Using net-telnet 0.1.1
14:28:58  Fetching sfl 2.3
14:28:58  Installing sfl 2.3
14:28:58  Fetching specinfra 2.82.2
14:28:58  Installing specinfra 2.82.2
14:28:59  Fetching serverspec 2.41.5
14:28:59  Installing serverspec 2.41.5
14:28:59  Fetching beaker-rspec 6.3.0
14:28:59  Installing beaker-rspec 6.3.0
14:28:59  Using bundler 1.17.3
14:28:59  Fetching docile 1.3.5
14:28:59  Installing docile 1.3.5
14:28:59  Fetching simplecov-html 0.12.3
14:29:00  Installing simplecov-html 0.12.3
14:29:00  Fetching simplecov 0.18.5
14:29:00  Installing simplecov 0.18.5
14:29:00  Fetching codecov 0.5.1
14:29:00  Installing codecov 0.5.1
14:29:00  Fetching concurrent-ruby 1.1.8
14:29:00  Installing concurrent-ruby 1.1.8
14:29:00  Fetching parallel 1.20.1
14:29:00  Installing parallel 1.20.1
14:29:00  Fetching faraday_middleware 0.14.0
14:29:00  Installing faraday_middleware 0.14.0
14:29:00  Fetching fast_gettext 1.1.2
14:29:01  Installing fast_gettext 1.1.2
14:29:01  Fetching locale 2.1.3
14:29:01  Installing locale 2.1.3
14:29:01  Fetching text 1.3.1
14:29:01  Installing text 1.3.1
14:29:01  Fetching gettext 3.2.9
14:29:01  Installing gettext 3.2.9
14:29:04  Fetching gettext-setup 0.34
14:29:04  Installing gettext-setup 0.34
14:29:04  Fetching semantic_puppet 1.0.3
14:29:04  Installing semantic_puppet 1.0.3
14:29:04  Fetching puppet_forge 2.3.4
14:29:04  Installing puppet_forge 2.3.4
14:29:04  Fetching dependency_checker 0.2.0
14:29:04  Installing dependency_checker 0.2.0
14:29:04  Fetching unf_ext 0.0.7.7
14:29:04  Installing unf_ext 0.0.7.7 with native extensions
14:29:12  Fetching unf 0.1.4
14:29:12  Installing unf 0.1.4
14:29:12  Fetching domain_name 0.5.20190701
14:29:12  Installing domain_name 0.5.20190701
14:29:12  Fetching ed25519 1.2.4
14:29:12  Installing ed25519 1.2.4 with native extensions
14:29:14  Fetching facter 4.0.52
14:29:14  Installing facter 4.0.52
14:29:15  Fetching jgrep 1.5.4
14:29:15  Installing jgrep 1.5.4
14:29:15  Fetching facterdb 1.6.0
14:29:15  Installing facterdb 1.6.0
14:29:17  Fetching hiera 3.7.0
14:29:17  Installing hiera 3.7.0
14:29:17  Fetching hirb 0.7.3
14:29:17  Installing hirb 0.7.3
14:29:17  Fetching http-accept 1.7.0
14:29:17  Installing http-accept 1.7.0
14:29:17  Fetching http-cookie 1.0.3
14:29:17  Installing http-cookie 1.0.3
14:29:17  Using json 2.1.0
14:29:17  Fetching json-schema 2.8.1
14:29:17  Installing json-schema 2.8.1
14:29:17  Fetching metaclass 0.0.4
14:29:17  Installing metaclass 0.0.4
14:29:17  Fetching spdx-licenses 1.3.0
14:29:17  Installing spdx-licenses 1.3.0
14:29:17  Fetching metadata-json-lint 3.0.0
14:29:17  Installing metadata-json-lint 3.0.0
14:29:18  Fetching mime-types-data 3.2021.0225
14:29:18  Installing mime-types-data 3.2021.0225
14:29:18  Fetching mime-types 3.3.1
14:29:18  Installing mime-types 3.3.1
14:29:18  Fetching mini_portile2 2.5.0
14:29:18  Installing mini_portile2 2.5.0
14:29:18  Fetching mocha 1.1.0
14:29:18  Installing mocha 1.1.0
14:29:18  Fetching netrc 0.11.0
14:29:18  Installing netrc 0.11.0
14:29:18  Fetching racc 1.5.2
14:29:18  Installing racc 1.5.2 with native extensions
14:29:19  Fetching nokogiri 1.11.2 (x86_64-linux)
14:29:20  Installing nokogiri 1.11.2 (x86_64-linux)
14:29:20  Fetching parallel_tests 3.5.2
14:29:20  Installing parallel_tests 3.5.2
14:29:20  Fetching parser 3.0.0.0
14:29:20  Installing parser 3.0.0.0
14:29:21  Fetching pathspec 0.2.1
14:29:21  Installing pathspec 0.2.1
14:29:21  Fetching pluginator 1.5.0
14:29:21  Installing pluginator 1.5.0
14:29:21  Fetching puppet-resource_api 1.8.13
14:29:21  Installing puppet-resource_api 1.8.13
14:29:21  Using scanf 1.0.0
14:29:21  Fetching puppet 7.5.0
14:29:21  Installing puppet 7.5.0
14:29:26  Fetching puppet-modulebuilder 0.2.1
14:29:26  Installing puppet-modulebuilder 0.2.1
14:29:26  Fetching rest-client 2.1.0
14:29:26  Installing rest-client 2.1.0
14:29:26  Fetching puppet-blacksmith 6.1.0
14:29:26  Installing puppet-blacksmith 6.1.0
14:29:26  Fetching table_print 1.5.7
14:29:26  Installing table_print 1.5.7
14:29:26  Fetching strings-ansi 0.2.0
14:29:26  Installing strings-ansi 0.2.0
14:29:26  Fetching unicode-display_width 1.7.0
14:29:26  Installing unicode-display_width 1.7.0
14:29:26  Fetching unicode_utils 1.4.0
14:29:26  Installing unicode_utils 1.4.0
14:29:26  Fetching strings 0.1.8
14:29:26  Installing strings 0.1.8
14:29:26  Fetching tty-screen 0.8.1
14:29:26  Installing tty-screen 0.8.1
14:29:26  Fetching tty-pager 0.13.0
14:29:26  Installing tty-pager 0.13.0
14:29:26  Fetching puppet-debugger 1.2.0
14:29:26  Installing puppet-debugger 1.2.0
14:29:26  Fetching puppet-lint 2.4.2
14:29:26  Installing puppet-lint 2.4.2
14:29:26  Fetching puppet-module-posix-default-r2.5 1.1.0
14:29:27  Installing puppet-module-posix-default-r2.5 1.1.0
14:29:27  Fetching rgen 0.8.2
14:29:27  Installing rgen 0.8.2
14:29:27  Fetching yard 0.9.26
14:29:27  Installing yard 0.9.26
14:29:28  Fetching puppet-strings 2.6.0
14:29:28  Installing puppet-strings 2.6.0
14:29:28  Fetching puppet-syntax 3.1.0
14:29:28  Installing puppet-syntax 3.1.0
14:29:28  Fetching rspec-puppet 2.8.0
14:29:28  Installing rspec-puppet 2.8.0
14:29:28  Fetching puppetlabs_spec_helper 3.0.0
14:29:28  Installing puppetlabs_spec_helper 3.0.0
14:29:28  Fetching rainbow 2.2.2
14:29:28  Installing rainbow 2.2.2 with native extensions
14:29:29  Fetching rspec-puppet-facts 2.0.1
14:29:29  Installing rspec-puppet-facts 2.0.1
14:29:29  Fetching rspec_junit_formatter 0.4.1
14:29:29  Installing rspec_junit_formatter 0.4.1
14:29:29  Fetching regexp_parser 2.1.1
14:29:29  Installing regexp_parser 2.1.1
14:29:29  Fetching rexml 3.2.4
14:29:29  Installing rexml 3.2.4
14:29:29  Fetching rubocop-ast 1.4.1
14:29:29  Installing rubocop-ast 1.4.1
14:29:29  Fetching ruby-progressbar 1.11.0
14:29:29  Installing ruby-progressbar 1.11.0
14:29:29  Fetching rubocop 1.6.1
14:29:29  Installing rubocop 1.6.1
14:29:30  Fetching rubocop-performance 1.9.1
14:29:30  Installing rubocop-performance 1.9.1
14:29:30  Fetching rubocop-rspec 2.0.1
14:29:30  Installing rubocop-rspec 2.0.1
14:29:30  Fetching simplecov-console 0.4.2
14:29:30  Installing simplecov-console 0.4.2
14:29:31  Fetching puppet-module-posix-dev-r2.5 1.1.0
14:29:31  Installing puppet-module-posix-dev-r2.5 1.1.0
14:29:31  Bundle complete! 15 Gemfile dependencies, 137 gems now installed.
14:29:31  Use `bundle info [gemname]` to see where a bundled gem is installed.
14:29:31  Post-install message from minitar:
14:29:31  The `minitar` executable is no longer bundled with `minitar`. If you are
14:29:31  expecting this executable, make sure you also install `minitar-cli`.

@h-haaks
Copy link
Author

h-haaks commented Mar 25, 2021

Docker inspect of container running SUT

[
    {
        "Id": "d87668d3819bd9931f83de7105212a90fab1edb46f5e73299789cc660d870e50",
        "Created": "2021-03-25T14:20:36.056014572Z",
        "Path": "/usr/sbin/init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 5845,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2021-03-25T14:20:36.635157535Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:6c0116b01e29531d008c1ab01a18f1d97a24e916164246f4d1fa88bae1103c4c",
        "ResolvConfPath": "/var/lib/docker/containers/d87668d3819bd9931f83de7105212a90fab1edb46f5e73299789cc660d870e50/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/d87668d3819bd9931f83de7105212a90fab1edb46f5e73299789cc660d870e50/hostname",
        "HostsPath": "/var/lib/docker/containers/d87668d3819bd9931f83de7105212a90fab1edb46f5e73299789cc660d870e50/hosts",
        "LogPath": "/var/lib/docker/containers/d87668d3819bd9931f83de7105212a90fab1edb46f5e73299789cc660d870e50/d87668d3819bd9931f83de7105212a90fab1edb46f5e73299789cc660d870e50-json.log",
        "Name": "/beaker-centos-7-x64-9f9350222500",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "max-file": "2",
                    "max-size": "100m"
                }
            },
            "NetworkMode": "default",
            "PortBindings": {
                "22/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "9985"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Capabilities": null,
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": true,
            "PublishAllPorts": true,
            "ReadonlyRootfs": false,
            "SecurityOpt": [
                "label=disable"
            ],
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/42fa59aafd84bca62809a588636d5208b7dfe60933ce0b8af23a475534d45e2c-init/diff:/var/lib/docker/overlay2/833bce27be1ff5f10d503cc75b25cefb97c8c8c0f4759891af46a97f91fa6c6c/diff:/var/lib/docker/overlay2/49bc790abaae888abe057e739fc0a52a3addb009abe4778e81e7c435ce8cd2b9/diff:/var/lib/docker/overlay2/689f7a54d7eed40f108def61f71b16763015720f37a9e46fa6aa65e1a6c39f8e/diff:/var/lib/docker/overlay2/8d5e24923f3549ce0117ecdce8329c53bb907e6ff2fa97ec4d2a4d0b438d8ffb/diff:/var/lib/docker/overlay2/443347eafd806fd2bfefe4a39e162ec8b7f48b1841fb026720f12de9135620d4/diff:/var/lib/docker/overlay2/424235e49a90024211b59bcc312d27e15aed20627c971e362124cc5bcc290a53/diff:/var/lib/docker/overlay2/8a1036aa47e43bd6de5c60cf0899a198663bc45ab631d535d6b242f2ecac9768/diff:/var/lib/docker/overlay2/7b0063f47402296e1da4a44cd9712a5dfaa13b8883d8707b447b3b8532c17723/diff:/var/lib/docker/overlay2/4414c371f89726fef6a43da268e3e7ff73b8f63e1f8ed7cb915737dff72c217d/diff:/var/lib/docker/overlay2/05ab39f14a6432318eb25a9853b5db6a78e2fc78974c04c1da32138c4d016408/diff:/var/lib/docker/overlay2/e40765cac5e71d553095a3f62bf2da4bc578351d596bc71d062dfd7f1df9da5c/diff:/var/lib/docker/overlay2/d4990cc50f6be81693950b5be93d44bd37db51dff26f8c5972c2a02bc973fa87/diff:/var/lib/docker/overlay2/49019d20c1b4e3a7c89f9e4c4ae58409df3cbe7a541ba15a9bb9b6fa05d5f1c6/diff",
                "MergedDir": "/var/lib/docker/overlay2/42fa59aafd84bca62809a588636d5208b7dfe60933ce0b8af23a475534d45e2c/merged",
                "UpperDir": "/var/lib/docker/overlay2/42fa59aafd84bca62809a588636d5208b7dfe60933ce0b8af23a475534d45e2c/diff",
                "WorkDir": "/var/lib/docker/overlay2/42fa59aafd84bca62809a588636d5208b7dfe60933ce0b8af23a475534d45e2c/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "centos-7-x64",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "22/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "container=docker"
            ],
            "Cmd": [
                "/usr/sbin/init"
            ],
            "Image": "6c0116b01e29",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "org.label-schema.build-date": "20201113",
                "org.label-schema.license": "GPLv2",
                "org.label-schema.name": "CentOS Base Image",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.vendor": "CentOS",
                "org.opencontainers.image.created": "2020-11-13 00:00:00+00:00",
                "org.opencontainers.image.licenses": "GPL-2.0-only",
                "org.opencontainers.image.title": "CentOS Base Image",
                "org.opencontainers.image.vendor": "CentOS"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "9f8c4bb3529f7f43d2e34d90410346a02d5c13464651c95660eb25e98e7c92d6",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "22/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "9985"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/9f8c4bb3529f",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "f3170d826436b21467c0502f0f1f6f702384795dabd656a8895cafcea5151f09",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.7",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:07",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "44237cc693d42f0d0fe7f39442794fa868df21e6616002d343b33de920914124",
                    "EndpointID": "f3170d826436b21467c0502f0f1f6f702384795dabd656a8895cafcea5151f09",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.7",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:07",
                    "DriverOpts": null
                }
            }
        }
    }
]

@h-haaks
Copy link
Author

h-haaks commented Mar 26, 2021

@h-haaks
Copy link
Author

h-haaks commented Mar 26, 2021

Seems to be a lot of issues around finding the right ip and port to use to talk to the container...
Could it be an idea to just test them all out and use the one where we get an answer?

"Host to container"
HostConfig["PortBindings"]["22/tcp"]["HostIp"]:HostConfig["PortBindings"]["22/tcp"]["HostPort"]

"Container to container using hostname (should normally be able to resolv hostname if the containers are on the same docker network)"
Config["Hostname"]:22

"Container to container using ip ( the default bridged network does not resolve hostnames )
NetworkSettings["IPAddress"]:22

"Container to container trough gateways as last resort"
NetworkSettings["Gateway"]:HostConfig["PortBindings"]["22/tcp"]["HostPort"]

@trevor-vaughan
Copy link
Contributor

@h-haaks That's not a bad idea 🤔 might have to give that a stab and see how things go.

trevor-vaughan added a commit to trevor-vaughan/beaker-docker that referenced this issue Jun 1, 2021
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
@trevor-vaughan
Copy link
Contributor

@h-haaks Can you take a look at #47 and see if it works for you?

@h-haaks
Copy link
Author

h-haaks commented Jun 1, 2021

I have never built a gem from source before, but i'll give it a try.

@h-haaks
Copy link
Author

h-haaks commented Jun 1, 2021

Ah, its just
gem 'beaker-docker', git: 'https://github.com/trevor-vaughan/beaker-docker.git', branch: 'fix_docker_connection', :require => false, :platforms => :ruby
in my Gemfile :)

@h-haaks
Copy link
Author

h-haaks commented Jun 1, 2021

Sorry @trevor-vaughan it does not seem to work...

00:31:18  Using beaker-docker 0.8.4 from https://github.com/trevor-vaughan/beaker-docker.git (at fix_docker_connection@cc8d9c9)
...
00:32:52  get
00:32:52  /containers/aa7fb12e9bade682fb6f56dc9110ab889e5e58657c4abb8e407321a78cca74d1/json
00:32:52  {}
00:32:52  
00:32:52  Using container connection at 172.17.0.1:22
00:32:52  node available as ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@172.17.0.1 -p 22
00:32:52  get
00:32:52  /containers/aa7fb12e9bade682fb6f56dc9110ab889e5e58657c4abb8e407321a78cca74d1/json
00:32:52  {}
00:32:52  
00:32:52  
00:32:52  centos-7-x64 00:32:51$ cat /etc/resolv.conf
00:32:52    Attempting ssh connection to 172.17.0.1, user: root, opts: {:password=>"root", :port=>"22", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}
00:32:54  root@172.17.0.1's password:Inappropriate ioctl for device

@QueerCodingGirl
Copy link
Contributor

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:

if @docker_type == 'docker' && ENV['DOCKER_HOST'] && !ENV.fetch('DOCKER_HOST','').include?(':///')

@QueerCodingGirl
Copy link
Contributor

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.
@trevor-vaughan Do you have time to look into this issue again?

@QueerCodingGirl
Copy link
Contributor

Sorry @trevor-vaughan it does not seem to work...

00:31:18  Using beaker-docker 0.8.4 from https://github.com/trevor-vaughan/beaker-docker.git (at fix_docker_connection@cc8d9c9)
...
00:32:52  get
00:32:52  /containers/aa7fb12e9bade682fb6f56dc9110ab889e5e58657c4abb8e407321a78cca74d1/json
00:32:52  {}
00:32:52  
00:32:52  Using container connection at 172.17.0.1:22
00:32:52  node available as ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@172.17.0.1 -p 22
00:32:52  get
00:32:52  /containers/aa7fb12e9bade682fb6f56dc9110ab889e5e58657c4abb8e407321a78cca74d1/json
00:32:52  {}
00:32:52  
00:32:52  
00:32:52  centos-7-x64 00:32:51$ cat /etc/resolv.conf
00:32:52    Attempting ssh connection to 172.17.0.1, user: root, opts: {:password=>"root", :port=>"22", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}
00:32:54  root@172.17.0.1's password:Inappropriate ioctl for device

@bastelfreak why did you close this issue? As stated by @h-haaks, this issue is NOT fixed by #47.

@bastelfreak
Copy link
Member

github closed it automatically because I merged #47 :)

@QueerCodingGirl
Copy link
Contributor

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)

@QueerCodingGirl
Copy link
Contributor

@h-haaks could you verify that this also works for you, please?

@h-haaks
Copy link
Author

h-haaks commented Aug 11, 2021

Hi @QueerCodingGirl, thanks for letting me know.
I'm a little busy at work right now but I'll try to get to it next week.

@h-haaks
Copy link
Author

h-haaks commented Aug 16, 2021

@QueerCodingGirl, I finally got around to test your branch.
I'm sorry, but it's still selecting wrong port.

00:39:33  Using beaker-docker 1.0.0 from https://github.com/QueerCodingGirl/beaker-docker.git (at QueerCodingGirl-dind-ssh-conn-fix@a4e679b)
...
00:41:03  Creating container from image e101d55ba619
00:41:03  post
00:41:03  /containers/create
00:41:03  {"name"=>"beaker-centos-7-x64-47505da267cc"}
00:41:03  {"Image":"e101d55ba619","Hostname":"centos-7-x64","HostConfig":{"PortBindings":{"22/tcp":[{"HostPort":"7518","HostIp":"0.0.0.0"}]},"PublishAllPorts":true,"RestartPolicy":{"Name":"always"},"Privileged":true}}
...
00:41:03  Using container connection at 172.17.0.1:22
00:41:03  node available as ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@172.17.0.1 -p 22
00:41:03  get
00:41:03  /containers/b984e30593da38be54b744b1b989db67ef492f6bfaa5157c12ac8223611bb86f/json
00:41:03  {}
00:41:03  
00:41:03  
00:41:03  centos-7-x64 00:41:01$ cat /etc/resolv.conf
00:41:03    Attempting ssh connection to 172.17.0.1, user: root, opts: {:password=>"root", :port=>"22", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}
00:41:03  root@172.17.0.1's password:Inappropriate ioctl for device

@h-haaks
Copy link
Author

h-haaks commented Aug 16, 2021

@QueerCodingGirl, I forgot to add the DOCKER_IN_DOCKER env variable ...
With that in place my tests seems to run successfully.

@QueerCodingGirl
Copy link
Contributor

Great! Now all we need is the review from @trevor-vaughan and a merge.

@ekohl ekohl closed this as completed in #51 Sep 7, 2021
@QueerCodingGirl
Copy link
Contributor

This issue has to be opened again...
One of the commits that got merged after my fix and before the release of 1.0.1 regressed my fix. It now uses the wrong ip/port again, even with DOCKER_IN_DOCKER set.
The mentioned commits are from @treydock and @trevor-vaughan

@ekohl ekohl reopened this Sep 28, 2021
@alelindq
Copy link

Also blocked by this issue after upgrade to version 1.1.1 when using docker in docker.
I made PR #64 which tries using container-to-container mode first if using nested docker.
Would this work for all scenarios?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants