1

I am trying to get Beaker to integrate with an Upstart enabled Dockerfile. This is my current nodeset:

HOSTS:
    ubuntu-server:
        roles:
         - master
        platform: ubuntu-14.04-x64
        image: ubuntu-upstart:14.04
        hypervisor: docker
        docker_cmd: '/sbin/init'
        docker_preserve_image: true
        docker_image_commands:
         - wget --no-check-certificate https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
         - apt-get install -y wget ca-certificates
         - dpkg -i puppetlabs-release-trusty.deb
         - apt-get update
         - apt-get -y install puppet curl ntpdate git ruby
         - "sed --in-place=.bak 's/without-password/yes/' /etc/ssh/sshd_config"

CONFIG:
  log_level: verbose
  type: foss

The problem is that this container is never started, as seen by docker ps. Beaker is also reporting:

node available as ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] -p 49204

ubuntu-server 13:40:43$  dpkg -s curl  
Warning: Try 1 -- Host 0.0.0.0 unreachable: connection closed by remote host
Warning: Trying again in 1 seconds
Warning: Try 2 -- Host 0.0.0.0 unreachable: Connection refused - connect(2) for "0.0.0.0" port 49204
Warning: Trying again in 1 seconds
Warning: Try 3 -- Host 0.0.0.0 unreachable: Connection refused - connect(2) for "0.0.0.0" port 49204
Warning: Trying again in 2 seconds

If I replace the docker_cmd with:

docker_cmd: /usr/sbin/sshd -D

Then it works, but without Upstart (which in turn break tests).

I can do: docker ps -a which shows some exited containers with command: /bin/sh -c /sbin/init

How can I make beaker honor the docker_cmd and not run /sbin/init under /bin/sh?

2 Answers 2

1

in your Gemfile, use this :

gem 'beaker', github: 'puppetlabs/beaker', branch: 'master'

They fixed the issue.

1

I fixed this issue by replacing

docker_cmd: '/sbin/init'

with

docker_cmd: ['/sbin/init']

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .