Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Installing ruby times out #3

Open
jacobh0 opened this issue Sep 29, 2013 · 9 comments
Open

Installing ruby times out #3

jacobh0 opened this issue Sep 29, 2013 · 9 comments

Comments

@jacobh0
Copy link

jacobh0 commented Sep 29, 2013

When I initially used this module, it worked fine. However it has since failed ever since (and I have no idea why). It seems the install process has some kind of race condition or some other non-deterministic failure going on.

My manifest:

# Install ruby 2.0
class { 'ruby':
  version => '2.0.0-p247',
  compile_from_source => true
}

My shell provisioner (ran before my puppet provisioner):

#!/bin/bash

echo "Updating apt..."
/usr/bin/apt-get update

echo "Removing old puppet..."
/opt/vagrant_ruby/bin/gem uninstall puppet

echo "Installing newer puppet..."
/opt/vagrant_ruby/bin/gem install puppet --no-ri --no-rdoc -v '3.2.1'

I am using the precise64 box: http://files.vagrantup.com/precise64.box

Some debug output:

Debug: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[PostExtract ruby-2.0.0-p247.zip in /var/tmp]/require: requires Exec[Retrieve http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.zip in /var/tmp]
Debug: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[PostExtract ruby-2.0.0-p247.zip in /var/tmp]/subscribe: subscribes to Exec[Extract ruby-2.0.0-p247.zip from /var/tmp]
Debug: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/Exec[install_packages_ruby_compile_prerequisites]/subscribe: subscribes to File[install_packages_ruby_compile_prerequisites]
Debug: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Chown ruby-2.0.0-p247.zip in /var/tmp]/require: requires Exec[Extract ruby-2.0.0-p247.zip from /var/tmp]
Debug: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/require: requires Puppi::Install_packages[ruby_compile_prerequisites]
Debug: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Extract ruby-2.0.0-p247.zip from /var/tmp]/require: requires Exec[Retrieve http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.zip in /var/tmp]
Debug: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Extract ruby-2.0.0-p247.zip from /var/tmp]/notify: subscribes to Exec[Chown ruby-2.0.0-p247.zip in /var/tmp]
Debug: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[install_packages_ruby_compile_prerequisites]: Autorequiring File[/root/puppi_install_packages]
Debug: /Schedule[daily]: Skipping device resources because running on a host
Debug: /Schedule[monthly]: Skipping device resources because running on a host
Debug: /Schedule[hourly]: Skipping device resources because running on a host
Notice: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[/root/puppi_install_packages]/ensure: created
Debug: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[/root/puppi_install_packages]: The container Puppi::Install_packages[ruby_compile_prerequisites] will propagate my refresh event
Notice: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[install_packages_ruby_compile_prerequisites]/ensure: created
Info: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[install_packages_ruby_compile_prerequisites]: Scheduling refresh of Exec[install_packages_ruby_compile_prerequisites]
Debug: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[install_packages_ruby_compile_prerequisites]: The container Puppi::Install_packages[ruby_compile_prerequisites] will propagate my refresh event
Debug: /Schedule[never]: Skipping device resources because running on a host
Debug: Exec[install_packages_ruby_compile_prerequisites](provider=posix): Executing '/root/puppi_install_packages/ruby_compile_prerequisites'
Debug: Executing '/root/puppi_install_packages/ruby_compile_prerequisites'
Error: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/Exec[install_packages_ruby_compile_prerequisites]: Failed to call refresh: Command exceeded timeout
Error: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/Exec[install_packages_ruby_compile_prerequisites]: Command exceeded timeout

It seems the ruby_compile_prerequisites simply times out. I have been able to get this to install Ruby 2.0 about twice out of all my attempts. I've stripped my manifest down to nothing to try and figure out if there was some kind of conflict. I have no idea what's going on.

@jacobh0
Copy link
Author

jacobh0 commented Sep 29, 2013

I've temporarily made it work by removing the dependency on ruby_compile_prerequisites all together, I am manually installing all the packages it requests in my shell provisioner:

#!/bin/bash

echo "Updating apt..."
/usr/bin/apt-get update
/usr/bin/apt-get install -y build-essential unzip vim git-core curl bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev libcurl4-openssl-dev libopenssl-ruby apache2-prefork-dev libapr1-dev libaprutil1-dev libx11-dev libffi-dev tcl-dev tk-dev

echo "Removing old puppet..."
/opt/vagrant_ruby/bin/gem uninstall puppet

echo "Installing newer puppet..."
/opt/vagrant_ruby/bin/gem install puppet --no-ri --no-rdoc -v '3.2.1'

However this isn't ideal...

@jacobh0
Copy link
Author

jacobh0 commented Sep 30, 2013

This may actually be a problem with puppi, as that function call seems to be the one that simply times out

@jacobh0
Copy link
Author

jacobh0 commented Oct 5, 2013

Any idea here? I would like to share my puppet provisioner but not being able to install ruby is a blocker as this isn't working as intended.

alvagante added a commit that referenced this issue Oct 5, 2013
@alvagante
Copy link
Member

Can you check if the above commit solves the timeout problem?

@jacobh0
Copy link
Author

jacobh0 commented Oct 5, 2013

It does not:

prerequisites]: Failed to call refresh: Command exceeded timeout
Error: /Stage[before-main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/Exec[install_packages_ruby_compile_prerequisites]: Command exceeded timeout

@alvagante
Copy link
Member

Can you try with a much higher value as timeout and verify it actually something happens on the system during this time?

@jacobh0
Copy link
Author

jacobh0 commented Oct 5, 2013

Few things:

  1. timeout is suppose to be a string, according to the comments
  2. I don't actually see the timeout variable being used anywhere?

@alvagante
Copy link
Member

Ooops,
just committed a patch to the puppi module to honour the timeout options, can you try to update it?

@jacobh0
Copy link
Author

jacobh0 commented Oct 5, 2013

Looks to be fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants