Coder Social home page Coder Social logo

Comments (21)

electrical avatar electrical commented on July 18, 2024

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.

igalic avatar igalic commented on July 18, 2024

I'm wondering now, how many core files you have there in your repo that it takes 10 minutes to scp…

from beaker.

electrical avatar electrical commented on July 18, 2024

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.

electrical avatar electrical commented on July 18, 2024

Seems the .vendor dir gets scp'ed as well. Scp runs are much faster now.
Any improvements we can think of ?

from beaker.

daenney avatar daenney commented on July 18, 2024

There's a bunch of dirs that are nasty, .vendor, .bundle, .vagrant, .gem, .git that we could exclude by default I think.

from beaker.

daenney avatar daenney commented on July 18, 2024

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.

electrical avatar electrical commented on July 18, 2024

Im gonna play with rsync ( http://rubygems.org/gems/rsync ) and see if we could replace it.
Might take a couple days :-)

from beaker.

anodelman avatar anodelman commented on July 18, 2024

@electrical any progress with rsync?

from beaker.

electrical avatar electrical commented on July 18, 2024

@anodelman no luck so far :-(

from beaker.

igalic avatar igalic commented on July 18, 2024

s/days/months/ ;)

from beaker.

igalic avatar igalic commented on July 18, 2024

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.

igalic avatar igalic commented on July 18, 2024

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.

daenney avatar daenney commented on July 18, 2024

That's a pretty spiffy way to do it 😛.

from beaker.

jantman avatar jantman commented on July 18, 2024

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.

anodelman avatar anodelman commented on July 18, 2024

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.

anodelman avatar anodelman commented on July 18, 2024

I'm going to attempt to get this into the next Beaker sprint. I'd like to re-create and diagnose.

from beaker.

anodelman avatar anodelman commented on July 18, 2024

Potential fix in #385 - at least it will get us more info.

from beaker.

igalic avatar igalic commented on July 18, 2024

\o/

from beaker.

jantman avatar jantman commented on July 18, 2024

@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.

anodelman avatar anodelman commented on July 18, 2024

Here's the 'scp ignore' PR #330, it will land in the next gem.

from beaker.

igalic avatar igalic commented on July 18, 2024

closing, seems to have been addressed (and released)

from beaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.