Skip to content

Instantly share code, notes, and snippets.

@leoc
Created August 28, 2014 10:24
Show Gist options
  • Save leoc/c4c20e5c9ee2865ff60e to your computer and use it in GitHub Desktop.
Save leoc/c4c20e5c9ee2865ff60e to your computer and use it in GitHub Desktop.
Error when running beaker specs for puppet-puma
$ rake acceptance
/home/arthur/.rvm/rubies/ruby-2.1.1/bin/ruby -S rspec spec/acceptance
Hypervisor for debian-7-4 is docker
Beaker::Hypervisor, found some docker boxes to create
Provisioning docker
provisioning debian-7-4
Creating image
Dockerfile is FROM debian:7.4
RUN apt-get update
RUN apt-get install -y openssh-server openssh-client curl ntpdate lsb-release
RUN mkdir -p /var/run/sshd
RUN echo root:root | chpasswd
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes -q openssl libssl-dev rubygems
RUN gem install puppet --no-ri --no-rdoc
RUN mkdir -p /etc/puppet/modules
EXPOSE 22
CMD ["/sbin/init"]
post
/v1.12/build
{:rm=>true}
Dockerfile0000640000000000000000000000064512377573150013323 0ustar00wheelwheel00000000000000 FROM debian:7.4
RUN apt-get update
RUN apt-get install -y openssh-server openssh-client curl ntpdate lsb-release
RUN mkdir -p /var/run/sshd
RUN echo root:root | chpasswd
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes -q openssl libssl-dev rubygems
RUN gem install puppet --no-ri --no-rdoc
RUN mkdir -p /etc/puppet/modules
EXPOSE 22
CMD ["/sbin/init"]
Creating container from image 8ab2faca79fc
post
/v1.12/containers/create
{}
{"Image":"8ab2faca79fc","Hostname":"debian-7-4"}
Starting container ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3
post
/v1.12/containers/ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3/start
{}
{"PublishAllPorts":true,"Privileged":true}
get
/v1.12/containers/ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3/json
{}
get
/v1.12/containers/ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3/json
{}
node available as ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@0.0.0.0 -p 49153
debian-7-4 11:29:13$ 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 closed by remote host
Warning: Trying again in 1 seconds
Created ssh connection to 0.0.0.0, user: root, opts: {:password=>"root", :port=>"49153", :user=>"root"}
Package: curl
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 364
Maintainer: Alessandro Ghedini <ghedo@debian.org>
Architecture: amd64
Version: 7.26.0-1+wheezy9
Replaces: curl-ssl
Provides: curl-ssl
Depends: libc6 (>= 2.7), libcurl3 (= 7.26.0-1+wheezy9), zlib1g (>= 1:1.1.4)
Description: command line tool for transferring data with URL syntax
curl is a command line tool for transferring data with URL syntax, supporting
DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, POP3, POP3S,
RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.
.
curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form
based upload, proxies, cookies, user+password authentication (Basic, Digest,
NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a
busload of other useful tricks.
Homepage: http://curl.haxx.se
debian-7-4 executed in 2.07 seconds
debian-7-4 11:29:15$ dpkg -s ntpdate
Package: ntpdate
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 227
Maintainer: Debian NTP Team <pkg-ntp-maintainers@lists.alioth.debian.org>
Architecture: amd64
Source: ntp
Version: 1:4.2.6.p5+dfsg-2
Depends: netbase, libc6 (>= 2.4), libssl1.0.0 (>= 1.0.0)
Pre-Depends: dpkg (>= 1.15.7.2)
Recommends: lockfile-progs
Breaks: dhcp3-client (<< 4.1.0-1)
Conffiles:
/etc/logcheck/ignore.d.server/ntpdate 68d4df7cceb0e97bde87126c3a56b219
/etc/dhcp/dhclient-exit-hooks.d/ntpdate 1d4c6af64ca132451ee95a08686ea111
/etc/default/ntpdate 71d857cae72ae1f53380ea4f2e38cb2e
/etc/network/if-up.d/ntpdate 78a5839e440618260d20d0bcecf05ada
Description: client for setting system time from NTP servers
NTP, the Network Time Protocol, is used to keep computer clocks
accurate by synchronizing them over the Internet or a local network,
or by following an accurate hardware receiver that interprets GPS,
DCF-77, NIST or similar time signals.
.
ntpdate is a simple NTP client that sets a system's clock to match
the time obtained by communicating with one or more NTP servers. It
is not sufficient, however, for maintaining an accurate clock in the
long run. ntpdate by itself is useful for occasionally setting the
time on machines that do not have full-time network access, such as
laptops.
.
If the full NTP daemon from the package "ntp" is installed, then
ntpdate is not necessary.
Homepage: http://support.ntp.org/
debian-7-4 executed in 0.01 seconds
debian-7-4 11:29:15$ dpkg -s lsb-release
Package: lsb-release
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 103
Maintainer: Debian LSB Team <debian-lsb@lists.debian.org>
Architecture: all
Multi-Arch: foreign
Source: lsb
Version: 4.1+Debian8+deb7u1
Depends: python (>= 2.6.6-7~), python (<< 2.8)
Recommends: apt
Suggests: lsb
Description: Linux Standard Base version reporting utility
The Linux Standard Base (http://www.linuxbase.org/) is a standard
core system that third-party applications written for Linux can
depend upon.
.
The lsb-release command is a simple tool to help identify the Linux
distribution being used and its compliance with the Linux Standard Base.
LSB conformance will not be reported unless the required metapackages are
installed.
.
While it is intended for use by LSB packages, this command may also
be useful for programmatically distinguishing between a pure Debian
installation and derived distributions.
Homepage: http://www.linuxfoundation.org/collaborate/workgroups/lsb
debian-7-4 executed in 0.01 seconds
localhost $ scp /home/arthur/projects/puppet/puma debian-7-4:/etc/puppet/modules/puma
copying /home/arthur/projects/puppet/puma/coverage/.resultset.json: 0/74
copying /home/arthur/projects/puppet/puma/coverage/.resultset.json: 74/74
copying /home/arthur/projects/puppet/puma/coverage/.last_run.json: 0/51
copying /home/arthur/projects/puppet/puma/coverage/.last_run.json: 51/51
copying /home/arthur/projects/puppet/puma/coverage/.resultset.json.lock: 0/0
copying /home/arthur/projects/puppet/puma/coverage/index.html: 0/2076
...
copying /home/arthur/projects/puppet/puma/LICENSE: 35147/35147
SCP'ed file /home/arthur/projects/puppet/puma to 0.0.0.0:/etc/puppet/modules/puma
puma::app class
configuring rack without bundler and rvm
debian-7-4 11:29:27$ uname -m
x86_64
debian-7-4 executed in 0.00 seconds
debian-7-4 11:29:27$ ls /etc/fedora-release
ls: cannot access /etc/fedora-release: No such file or directory
debian-7-4 executed in 0.00 seconds
Exited: 2
debian-7-4 11:29:27$ ls /etc/redhat-release
ls: cannot access /etc/redhat-release: No such file or directory
debian-7-4 executed in 0.00 seconds
Exited: 2
debian-7-4 11:29:27$ ls /etc/system-release
ls: cannot access /etc/system-release: No such file or directory
debian-7-4 executed in 0.00 seconds
Exited: 2
debian-7-4 11:29:27$ ls /etc/SuSE-release
ls: cannot access /etc/SuSE-release: No such file or directory
debian-7-4 executed in 0.00 seconds
Exited: 2
debian-7-4 11:29:27$ ls /etc/debian_version
/etc/debian_version
debian-7-4 executed in 0.00 seconds
debian-7-4 11:29:27$ lsb_release -ir
Distributor ID: Debian
Release: 7.4
debian-7-4 executed in 0.05 seconds
debian-7-4 11:29:27$ mktemp -t apply_manifest.pp.XXXXXX
/tmp/apply_manifest.pp.FHUQ0v
debian-7-4 executed in 0.00 seconds
localhost $ scp /tmp/beaker20140828-14264-vchi0b debian-7-4:/tmp/apply_manifest.pp.FHUQ0v
copying /tmp/beaker20140828-14264-vchi0b: 0/937
copying /tmp/beaker20140828-14264-vchi0b: 937/937
SCP'ed file /tmp/beaker20140828-14264-vchi0b to 0.0.0.0:/tmp/apply_manifest.pp.FHUQ0v
debian-7-4 11:29:28$ env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.FHUQ0v
Notice: Compiled catalog for debian-7-4 in environment production in 0.34 seconds
Info: Applying configuration version '1409218168'
Notice: /Stage[main]/Main/Package[puma]/ensure: created
Notice: /Stage[main]/Main/Package[sinatra]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/User[deployment]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/current]/ensure: created
Notice: /Stage[main]/Main/File[/srv/redmine/current/tmp]/ensure: created
Notice: /Stage[main]/Main/File[/srv/redmine/current/config]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/shared]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/shared/log]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/shared/tmp]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/shared/tmp/pids]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/home/deployment]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/shared/tmp/sockets]/ensure: created
Notice: /Stage[main]/Main/File[/srv/redmine/current/log]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/shared/config]/ensure: created
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/srv/redmine/shared/config/puma.rb]/ensure: defined content as '{md5}e17cefa9f95a484bff9c79c979187c26'
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/etc/init.d/redmine]/ensure: defined content as '{md5}174b26a203dc8091e366c36a9636f146'
Notice: /Stage[main]/Main/File[/srv/redmine/current/config.ru]/ensure: defined content as '{md5}b92cdc0d3d47c9f3e6178152b7018154'
Notice: /Stage[main]/Main/Puma::App[redmine]/Service[redmine]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Main/Puma::App[redmine]/Service[redmine]: Unscheduling refresh on Service[redmine]
Info: Creating state file /var/lib/puppet/state/state.yaml
Notice: Finished catalog run in 94.21 seconds
debian-7-4 executed in 95.56 seconds
Exited: 2
debian-7-4 11:31:03$ mktemp -t apply_manifest.pp.XXXXXX
/tmp/apply_manifest.pp.4j4fki
debian-7-4 executed in 0.00 seconds
localhost $ scp /tmp/beaker20140828-14264-11sztl3 debian-7-4:/tmp/apply_manifest.pp.4j4fki
copying /tmp/beaker20140828-14264-11sztl3: 0/937
copying /tmp/beaker20140828-14264-11sztl3: 937/937
SCP'ed file /tmp/beaker20140828-14264-11sztl3 to 0.0.0.0:/tmp/apply_manifest.pp.4j4fki
debian-7-4 11:31:03$ env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.4j4fki
Notice: Compiled catalog for debian-7-4 in environment production in 0.32 seconds
Info: Applying configuration version '1409218264'
Notice: /Stage[main]/Main/Puma::App[redmine]/Service[redmine]/enable: enable changed 'false' to 'true'
Notice: Finished catalog run in 0.26 seconds
debian-7-4 executed in 1.41 seconds
Exited: 2
should work without errors (FAILED - 1)
File "/srv/redmine/shared/config/puma.rb"
debian-7-4 11:31:05$ test -f /srv/redmine/shared/config/puma.rb
debian-7-4 executed in 0.00 seconds
should be file
debian-7-4 11:31:05$ grep -qs -- application_path\ \=\ \'/srv/redmine/current\' /srv/redmine/shared/config/puma.rb || grep -qFs -- application_path\ \=\ \'/srv/redmine/current\' /srv/redmine/shared/config/puma.rb
debian-7-4 executed in 0.00 seconds
should contain "application_path = '/srv/redmine/current'"
debian-7-4 11:31:05$ grep -qs -- pidfile\ \"\#\{application_path\}/tmp/pids/puma.pid\" /srv/redmine/shared/config/puma.rb || grep -qFs -- pidfile\ \"\#\{application_path\}/tmp/pids/puma.pid\" /srv/redmine/shared/config/puma.rb
debian-7-4 executed in 0.00 seconds
should contain "pidfile \"\#{application_path}/tmp/pids/puma.pid\""
debian-7-4 11:31:05$ grep -qs -- state_path\ \"\#\{application_path\}/tmp/pids/puma.state\" /srv/redmine/shared/config/puma.rb || grep -qFs -- state_path\ \"\#\{application_path\}/tmp/pids/puma.state\" /srv/redmine/shared/config/puma.rb
debian-7-4 executed in 0.00 seconds
should contain "state_path \"\#{application_path}/tmp/pids/puma.state\""
debian-7-4 11:31:05$ grep -qs -- stdout_redirect\ \"\#\{application_path\}/log/puma.stdout.log\",\ \"\#\{application_path\}/log/puma.stderr.log\" /srv/redmine/shared/config/puma.rb || grep -qFs -- stdout_redirect\ \"\#\{application_path\}/log/puma.stdout.log\",\ \"\#\{application_path\}/log/puma.stderr.log\" /srv/redmine/shared/config/puma.rb
debian-7-4 executed in 0.00 seconds
should contain "stdout_redirect \"\#{application_path}/log/puma.stdout.log\", \"\#{application_path}/log/puma.stderr.log\""
debian-7-4 11:31:05$ grep -qs -- bind\ \"unix://\#\{application_path\}/tmp/sockets/puma.socket\" /srv/redmine/shared/config/puma.rb || grep -qFs -- bind\ \"unix://\#\{application_path\}/tmp/sockets/puma.socket\" /srv/redmine/shared/config/puma.rb
debian-7-4 executed in 0.00 seconds
should contain "bind \"unix://\#{application_path}/tmp/sockets/puma.socket\""
File "/etc/init.d/redmine"
debian-7-4 11:31:05$ test -f /etc/init.d/redmine
debian-7-4 executed in 0.00 seconds
should be file
debian-7-4 11:31:05$ grep -qs -- APP_ROOT\=\"/srv/redmine/current\" /etc/init.d/redmine || grep -qFs -- APP_ROOT\=\"/srv/redmine/current\" /etc/init.d/redmine
debian-7-4 executed in 0.00 seconds
should contain "APP_ROOT=\"/srv/redmine/current\""
debian-7-4 11:31:05$ grep -qs -- APP_USER\=\"deployment\" /etc/init.d/redmine || grep -qFs -- APP_USER\=\"deployment\" /etc/init.d/redmine
debian-7-4 executed in 0.00 seconds
should contain "APP_USER=\"deployment\""
debian-7-4 11:31:05$ grep -qs -- NAME\=\"redmine\" /etc/init.d/redmine || grep -qFs -- NAME\=\"redmine\" /etc/init.d/redmine
debian-7-4 executed in 0.00 seconds
should contain "NAME=\"redmine\""
debian-7-4 11:31:05$ grep -qs -- DESC\=\"redmine\" /etc/init.d/redmine || grep -qFs -- DESC\=\"redmine\" /etc/init.d/redmine
debian-7-4 executed in 0.00 seconds
should contain "DESC=\"redmine\""
Service "redmine"
debian-7-4 11:31:05$ ls /etc/rc3.d/ | grep -- '^S..redmine' || grep 'start on' /etc/init/redmine.conf
S01redmine
debian-7-4 executed in 0.00 seconds
should be enabled
configuring rack with bundler
debian-7-4 11:31:05$ mktemp -t apply_manifest.pp.XXXXXX
/tmp/apply_manifest.pp.qkIH48
debian-7-4 executed in 0.00 seconds
localhost $ scp /tmp/beaker20140828-14264-4s2n1w debian-7-4:/tmp/apply_manifest.pp.qkIH48
copying /tmp/beaker20140828-14264-4s2n1w: 0/2031
copying /tmp/beaker20140828-14264-4s2n1w: 2031/2031
SCP'ed file /tmp/beaker20140828-14264-4s2n1w to 0.0.0.0:/tmp/apply_manifest.pp.qkIH48
debian-7-4 11:31:05$ env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.qkIH48
Notice: Compiled catalog for debian-7-4 in environment production in 0.34 seconds
Info: Applying configuration version '1409218265'
Notice: /Stage[main]/Main/Package[bundler]/ensure: created
Notice: /Stage[main]/Main/File[/srv/redmine/current/Gemfile.lock]/ensure: defined content as '{md5}fcc7a0f3cdcab7ea0f40bd51e56991e9'
Notice: /Stage[main]/Main/File[/srv/redmine/current/Gemfile]/ensure: defined content as '{md5}beee9b4f097acf4a626fa8e92f4590bb'
Notice: /Stage[main]/Main/Exec[install-app-bundle]/returns: executed successfully
Info: /Stage[main]/Main/Puma::App[redmine]/File[/etc/init.d/redmine]: Filebucketed /etc/init.d/redmine to puppet with sum 174b26a203dc8091e366c36a9636f146
Notice: /Stage[main]/Main/Puma::App[redmine]/File[/etc/init.d/redmine]/content: content changed '{md5}174b26a203dc8091e366c36a9636f146' to '{md5}97d5bd98b0bbcad0a92e1515a997409e'
Notice: /Stage[main]/Main/Puma::App[redmine]/Service[redmine]/enable: enable changed 'false' to 'true'
Notice: Finished catalog run in 23.64 seconds
debian-7-4 executed in 24.73 seconds
Exited: 2
debian-7-4 11:31:29$ mktemp -t apply_manifest.pp.XXXXXX
/tmp/apply_manifest.pp.z0V2Iz
debian-7-4 executed in 0.00 seconds
localhost $ scp /tmp/beaker20140828-14264-emxkjv debian-7-4:/tmp/apply_manifest.pp.z0V2Iz
copying /tmp/beaker20140828-14264-emxkjv: 0/2031
copying /tmp/beaker20140828-14264-emxkjv: 2031/2031
SCP'ed file /tmp/beaker20140828-14264-emxkjv to 0.0.0.0:/tmp/apply_manifest.pp.z0V2Iz
debian-7-4 11:31:29$ env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.z0V2Iz
Notice: Compiled catalog for debian-7-4 in environment production in 0.33 seconds
Info: Applying configuration version '1409218290'
Notice: /Stage[main]/Main/Puma::App[redmine]/Service[redmine]/enable: enable changed 'false' to 'true'
Notice: Finished catalog run in 0.37 seconds
debian-7-4 executed in 1.53 seconds
Exited: 2
should work without errors (FAILED - 2)
File "/etc/init.d/redmine"
debian-7-4 11:31:31$ test -f /etc/init.d/redmine
debian-7-4 executed in 0.00 seconds
should be file
debian-7-4 11:31:31$ grep -qs -- BUNDLE_PREFIX\=\"\ bundle\ exec\" /etc/init.d/redmine || grep -qFs -- BUNDLE_PREFIX\=\"\ bundle\ exec\" /etc/init.d/redmine
debian-7-4 executed in 0.00 seconds
should contain "BUNDLE_PREFIX=\" bundle exec\""
Service "redmine"
debian-7-4 11:31:31$ ls /etc/rc3.d/ | grep -- '^S..redmine' || grep 'start on' /etc/init/redmine.conf
S01redmine
debian-7-4 executed in 0.00 seconds
should be enabled
Cleaning up docker
stop container ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3
post
/v1.12/containers/ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3/stop
{}
{}
delete container ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3
delete
/v1.12/containers/ec489c3a446a472bab4746f16d3f6fe41c48789f92da1b260961630e793a89b3
{}
Failures:
1) puma::app class configuring rack without bundler and rvm should work without errors
Failure/Error: expect(apply_manifest(pp, :catch_failures => true).exit_code).to eq(0)
expected: 0
got: 2
(compared using ==)
# ./spec/acceptance/puma__app_spec.rb:46:in `block (3 levels) in <top (required)>'
2) puma::app class configuring rack with bundler should work without errors
Failure/Error: expect(apply_manifest(pp, :catch_failures => true).exit_code).to eq(0)
expected: 0
got: 2
(compared using ==)
# ./spec/acceptance/puma__app_spec.rb:133:in `block (3 levels) in <top (required)>'
Finished in 2 minutes 17.6 seconds
17 examples, 2 failures
Failed examples:
rspec ./spec/acceptance/puma__app_spec.rb:5 # puma::app class configuring rack without bundler and rvm should work without errors
rspec ./spec/acceptance/puma__app_spec.rb:72 # puma::app class configuring rack with bundler should work without errors
/home/arthur/.rvm/rubies/ruby-2.1.1/bin/ruby -S rspec spec/acceptance failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment