beaker

231 views
Skip to first unread message

Marc Lucke

unread,
Feb 5, 2015, 7:33:51 PM2/5/15
to puppet...@googlegroups.com
Hi,

I'm having excruciating problems with just getting beaker to run on
Fedora 21, Ubuntu 14.10 and even CentOS6. I don't normally ask for help
because frankly I don't need it. I use rbenv & native versions of Ruby
and although it's a pain in the flower to get bundle to install
everything, bundle exec rake spec works fine, it's only when it comes to
spinning up a SUT that I get issues.

The first issue I get is centos. I can't get
centos-64-x64-vbox4210-nocm in the puppetlabs-apache to get past the
initial vagrant ssh stage. So I specified
centos-65-x64-virtualbox-puppet instead & then it will get to that
point. However it fails with:

-----
Allocated a PTY on 10.255.116.82 for "sudo -E /sbin/service sshd restart"
Warning: Try 1 -- Host 10.255.116.82 unreachable: connection closed by
remote host
Warning: Trying again in 1 seconds
...
Warning: Trying again in 5 seconds
Warning: Try 6 -- Host 10.255.116.82 unreachable: connection closed by
remote host
Warning: Trying again in k seconds
....
Warning: Try 11 -- Host 10.255.116.82 unreachable: connection closed by
remote host
Warning: Trying again in 89 seconds
Failed to connect to 10.255.116.82
Failed: errored in CLI.provision
#<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1"
port 2222>
/home/mlucke/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/beaker-2.3.0/bin/beaker:6
Cleanup: cleaning up after failed run
-----

I set v.gui=true in ~/.vagrant.d/Vagrantfile & if I logged in & did
'sudo -E /sbin/service sshd restart' before the failure to connect, I
could get it to keep going. The beaker test I'd written was fine, but
the beaker-rspec test of the puppetlabs-apache module did not.

The second issue I get is trying to use docker, & an issue I get I also
get in vagrant when trying the puppetlabs-apache test, & that is the
error: "mock_framework configuration option must be configured before
any example groups are defined"

I'm tearing my hair out with this. It shouldn't be this hard?

So anyway, I'd like to ask if anyone here can test puppetlabs-apache
with beaker-spec if they could please please tell me versions of
vagrant, ruby, OS etc. Better still if you have a box to share that'd
be great (I did find one on vagrantcloud but couldn't get it working).
Ultimately to avoid the vagrant you can't run a virtualbox inside a
virtualbox problem, I'd love beaker to use docker instead.

Finally, the machine doing the beaker tests is behind a proxy, &
complexity behind that is fiendish. I can get part of the way with
vagrant-proxyconf & building base docker images with proxies set except
that beaker rebuilds the docker container without the env - grrr!


Cheers

Gareth Rushgrove

unread,
Feb 6, 2015, 7:32:23 AM2/6/15
to puppet...@googlegroups.com
What version of Vagrant are you using? Vagrant recently switched from
a fixed ssh key to a generated one, and I ran into a similar problem.

The latest version of Vagrant is 1.7.2.

Gareth

> So anyway, I'd like to ask if anyone here can test puppetlabs-apache with
> beaker-spec if they could please please tell me versions of vagrant, ruby,
> OS etc. Better still if you have a box to share that'd be great (I did find
> one on vagrantcloud but couldn't get it working). Ultimately to avoid the
> vagrant you can't run a virtualbox inside a virtualbox problem, I'd love
> beaker to use docker instead.
>
> Finally, the machine doing the beaker tests is behind a proxy, & complexity
> behind that is fiendish. I can get part of the way with vagrant-proxyconf &
> building base docker images with proxies set except that beaker rebuilds the
> docker container without the env - grrr!
>
>
> Cheers
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/54D40BDE.5000706%40marcsnet.com.
> For more options, visit https://groups.google.com/d/optout.



--
Gareth Rushgrove
@garethr

devopsweekly.com
morethanseven.net
garethrushgrove.com

hohum

unread,
Feb 20, 2015, 7:38:34 AM2/20/15
to puppet...@googlegroups.com
running 1.7.2 - 1.6.5 did the same thing :(

Alice Nodelman

unread,
Feb 20, 2015, 11:56:06 AM2/20/15
to puppet...@googlegroups.com
There's an issue filed for our vagrant centos6 boxes not working with beaker:

https://github.com/puppetlabs/beaker/issues/702

It looks like the same state that you are hitting.  Could you attempt on centos5 or another platform?

alice.

Alice Nodelman

unread,
Feb 20, 2015, 12:09:40 PM2/20/15
to puppet...@googlegroups.com
Beaker people hang out in #puppet-dev on freenode irc - there are more docker experts there (an area that I can't be very helpful in).


We have also recently created a 'puppet beaker' group:

https://groups.google.com/forum/#!forum/puppet-beaker

alice.


Marc Lucke

unread,
Feb 20, 2015, 10:44:32 PM2/20/15
to puppet...@googlegroups.com

> On Friday, 6 February 2015 23:32:23 UTC+11, garethr wrote:
>
> On 6 February 2015 at 01:33, Marc Lucke <ma...@marcsnet.com
got it - I think.

It isn't enough to downgrade vagrant, you have to rm -rf .vagrant
~/.vagrant.d/ to get centos-65 to work - probably 6.4 too.

Took a long time to work this out!

Marc Lucke

unread,
Feb 21, 2015, 6:33:39 AM2/21/15
to puppet...@googlegroups.com
I spoke too soon :( It's only centos 65 & 64 btw

Marc Lucke

unread,
Feb 21, 2015, 5:11:25 PM2/21/15
to puppet...@googlegroups.com
On 22/02/2015 8:41 AM, Marc Lucke wrote:
I found something that works.  I forked https://github.com/puppetlabs/beaker.git & changed line 347 of lib/beaker/host_prebuilt_steps.rb

- host.exec(Command.new("sudo -E /sbin/service sshd restart"), {:pty => true})
+ host.exec(Command.new("sudo -E /sbin/service sshd restart"))

and then recreated and used that gem instead.

I had to work out what Corey Osmond was talking about on https://github.com/puppetlabs/beaker/pull/545 however what he said was right.

I'm a bit pushed for time - I should work out how to do a pull request to puppetlabs in the way they want it so that their code works.  It bothers me that beaker is so old now & doesn't seem to be getting lurvin.

Oh - & vagrant 1.7.2 is fine.

bit of a "der" moment - could have just looked at https://github.com/puppetlabs/beaker/pull/545/files to find out what Corey referred to.

Marc Lucke

unread,
Feb 21, 2015, 5:15:48 PM2/21/15
to puppet...@googlegroups.com

Marc Lucke

unread,
Feb 21, 2015, 5:43:48 PM2/21/15
to puppet...@googlegroups.com
On 21/02/2015 10:33 PM, Marc Lucke wrote:
Reply all
Reply to author
Forward
0 new messages