Comments (21)
For my tests it hangs on the scp step for quite a while.
Checked if there are any symlinks but there are none.
Some runs take about 10 minutes now, would be nice to improve that :-)
from beaker.
I'm wondering now, how many core files you have there in your repo that it takes 10 minutes to scp…
from beaker.
Apparently none at all.
But... i do have a .vendor dir in there for the specific gems for each build. i most likely could drop that. ( 84MB )
Will give that a shot.
from beaker.
Seems the .vendor dir gets scp'ed as well. Scp runs are much faster now.
Any improvements we can think of ?
from beaker.
There's a bunch of dirs that are nasty, .vendor
, .bundle
, .vagrant
, .gem
, .git
that we could exclude by default I think.
from beaker.
Honestly I would prefer a solution the other way around. Exclude everything by default unless it's in include_paths
, and we can probably add manifests
, lib
, templates
and files
by default to include_paths
.
from beaker.
Im gonna play with rsync ( http://rubygems.org/gems/rsync ) and see if we could replace it.
Might take a couple days :-)
from beaker.
@electrical any progress with rsync?
from beaker.
@anodelman no luck so far :-(
from beaker.
s/days/months/ ;)
from beaker.
I'm running into a related problem lately, where the scp job takes 10 minutes:
ubuntu-server-12044-x64 18:03:03$ apt-get install -y puppet
Reading package lists...
Building dependency tree...
Reading state information...
puppet is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ubuntu-server-12044-x64 executed in 0.59 seconds
localhost $ scp /home/igalic/src/acme/puppet/environment/production_redux/modules/acme-pusher ubuntu-server-12044-x64:/etc/puppet/modules/pusher {}
ubuntu-server-12044-x64 18:13:20$ 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 module install puppetlabs-stdlib
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forge.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
└── puppetlabs-stdlib (v4.1.0)
ubuntu-server-12044-x64 executed in 3.43 seconds
from beaker.
So… I was wondering, why does it take soooooooooooooooooooooooooooooooooooooooo looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong…
I ran a strace against the process,
stat("/etc/puppet/modules/pusher/vendor/bundle/ruby/1.9.1/gems/serverspec-1.0.0/lib/serverspec/matchers/be_installed.rb", 0x7fffa8dc0290) = -1 ENOENT (No such file or directory)
open("/etc/puppet/modules/pusher/vendor/bundle/ruby/1.9.1/gems/serverspec-1.0.0/lib/serverspec/matchers/be_installed.rb", O_WRONLY|O_CREAT, 0644) = 3
write(1, "\0", 1) = 1
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fcntl(0, F_GETFL) = 0 (flags O_RDONLY)
fcntl(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
read(0, "RSpec::Matchers.define :be_installed do\n match do |name|\n "..., 233) = 233
fcntl(0, F_GETFL) = 0x800 (flags O_RDONLY|O_NONBLOCK)
fcntl(0, F_SETFL, O_RDONLY) = 0
write(3, "RSpec::Matchers.define :be_installed do\n match do |name|\n "..., 233) = 233
ftruncate(3, 233) = 0
close(3) = 0
read(0, "\0", 1) = 1
write(1, "\0", 1) = 1
read(0, "C", 1) = 1
read(0, "0", 1) = 1
read(0, "6", 1) = 1
read(0, "4", 1) = 1
read(0, "4", 1) = 1
read(0, " ", 1) = 1
read(0, "2", 1) = 1
read(0, "5", 1) = 1
read(0, "9", 1) = 1
read(0, " ", 1) = 1
read(0, "b", 1) = 1
read(0, "e", 1) = 1
read(0, "_", 1) = 1
read(0, "e", 1) = 1
read(0, "n", 1) = 1
read(0, "a", 1) = 1
read(0, "b", 1) = 1
read(0, "l", 1) = 1
read(0, "e", 1) = 1
read(0, "d", 1) = 1
read(0, ".", 1) = 1
read(0, "r", 1) = 1
read(0, "b", 1) = 1
read(0, "\n", 1) = 1
stat("/etc/puppet/modules/pusher/vendor/bundle/ruby/1.9.1/gems/serverspec-1.0.0/lib/serverspec/matchers/be_enabled.rb", 0x7fffa8dc0290) = -1 ENOENT (No such file or directory)
open("/etc/puppet/modules/pusher/vendor/bundle/ruby/1.9.1/gems/serverspec-1.0.0/lib/serverspec/matchers/be_enabled.rb", O_WRONLY|O_CREAT, 0644) = 3
write(1, "\0", 1) = 1
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fcntl(0, F_GETFL) = 0 (flags O_RDONLY)
fcntl(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
read(0, 0x7f1e872949f0, 259) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=0, events=POLLIN}], 1, -1) = 1 ([{fd=0, revents=POLLIN}])
read(0, "RSpec::Matchers.define :be_enabled do\n match do |subject|\n "..., 259) = 259
fcntl(0, F_GETFL) = 0x800 (flags O_RDONLY|O_NONBLOCK)
fcntl(0, F_SETFL, O_RDONLY) = 0
write(3, "RSpec::Matchers.define :be_enabled do\n match do |subject|\n "..., 259) = 259
ftruncate(3, 259) = 0
close(3) = 0
read(0, "\0", 1) = 1
write(1, "\0", 1) = 1
read(0, "C", 1) = 1
read(0, "0", 1) = 1
read(0, "6", 1) = 1
read(0, "4", 1) = 1
read(0, "4", 1) = 1
read(0, " ", 1) = 1
read(0, "1", 1) = 1
read(0, "1", 1) = 1
read(0, "8", 1) = 1
read(0, " ", 1) = 1
read(0, "r", 1) = 1
read(0, "e", 1) = 1
read(0, "t", 1) = 1
read(0, "u", 1) = 1
read(0, "r", 1) = 1
read(0, "n", 1) = 1
read(0, "_", 1) = 1
read(0, "s", 1) = 1
read(0, "t", 1) = 1
read(0, "d", 1) = 1
read(0, "e", 1) = 1
read(0, "r", 1) = 1
read(0, "r", 1) = 1
read(0, ".", 1) = 1
read(0, "r", 1) = 1
read(0, "b", 1) = 1
read(0, "\n", 1) = 1
stat("/etc/puppet/modules/pusher/vendor/bundle/ruby/1.9.1/gems/serverspec-1.0.0/lib/serverspec/matchers/return_stderr.rb", 0x7fffa8dc0290) = -1 ENOENT (No such file or directory)
open("/etc/puppet/modules/pusher/vendor/bundle/ruby/1.9.1/gems/serverspec-1.0.0/lib/serverspec/matchers/return_stderr.rb", O_WRONLY|O_CREAT, 0644) = 3
write(1, "\0", 1) = 1
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fcntl(0, F_GETFL) = 0 (flags O_RDONLY)
fcntl(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
read(0, 0x7f1e872949f0, 118) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=0, events=POLLIN}], 1, -1) = 1 ([{fd=0, revents=POLLIN}])
read(0, "RSpec::Matchers.define :return_stderr do |content|\n match d"..., 118) = 118
fcntl(0, F_GETFL) = 0x800 (flags O_RDONLY|O_NONBLOCK)
fcntl(0, F_SETFL, O_RDONLY) = 0
write(3, "RSpec::Matchers.define :return_stderr do |content|\n match d"..., 118) = 118
ftruncate(3, 118) = 0
close(3) = 0
read(0, ^C <unfinished ...>
Process 1657 detached
turns out it's reading 1 byte at a time.
from beaker.
That's a pretty spiffy way to do it 😛.
from beaker.
Yeah, I'm getting the ~10 minute scp when running the acceptance tests for puppetlabs-rabbitmq... quite painful given that this is the first time I've done work with beaker and there's lots of iteration involved...
from beaker.
There is a pending PR for including an :ignore option to scp commands in beaker - but that doesn't explain the 1-byte-at-a-time that you are seeing.
from beaker.
I'm going to attempt to get this into the next Beaker sprint. I'd like to re-create and diagnose.
from beaker.
Potential fix in #385 - at least it will get us more info.
from beaker.
\o/
from beaker.
@anodelman do you have a link to the PR that includes the :ignore option? (I couldn't find mention of any such option supported upstream in Net::SCP)
Having bundler install to somewhere outside of my module directory helped a lot of this problem, and I was able to work around the rest of it by cleaning my spec directory (fixtures) before running the acceptance tests. Getting modules that aren't on the forge (or module dependencies that are direct from git) are a bit of a problem, but my awful hack around that was to clean before acceptance, and then system("bundle exec rake spec_prep")
at the right place in my acceptance helper.
from beaker.
Here's the 'scp ignore' PR #330, it will land in the next gem.
from beaker.
closing, seems to have been addressed (and released)
from beaker.
Related Issues (20)
- The beaker reboot needs to cross minute boundaries based on the method used HOT 6
- retry_on says that it can take an Array of hosts, but it will fail if one is passed
- beaker is failing to run acceptance tests on existing node HOT 2
- Rsync may not be able to use a provided password for the SSH connection HOT 2
- (BKR-1690) Rm -rf not working when path has spaces and logging on localhost
- (BKR-1675) Update net-scp to version 3.0.0 HOT 1
- Add support for opensuse? HOT 3
- The get_ip method should match on any vagrant-backed hypervisor
- ssh_config file not used by default HOT 3
- EL 9 error - /sbin/service: No such file or directory
- Failed to exec 'vagrant up' (rbenv, ruby 2.7.6, bundler 2.3.19, virtualbox) HOT 11
- Ruby 3.1/Psych 4 compatibility issues HOT 3
- 4.39.0 breaks beaker-puppet tests HOT 1
- Consider setting defaults to systemctl/systemd commands
- beaker master scp issue HOT 1
- Support installing modules from git branches HOT 4
- puppet_module_install excludes too much HOT 4
- having error finding my class using beaker HOT 1
- how can i test hiera roles using beaker? HOT 2
- Better Openstack IP address assignment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beaker.