Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs when installing ruby #157

Closed
c10l opened this issue Jan 25, 2013 · 53 comments
Closed

Hangs when installing ruby #157

c10l opened this issue Jan 25, 2013 · 53 comments

Comments

@c10l
Copy link

c10l commented Jan 25, 2013

This cookbook is hanging during the ruby install.

How to reproduce:

  • Clone the cookbook repo
  • vagrant up

The VM spins up, then hangs. I've been waiting for about 2 hours :)

This has happened on newly created EC2 VMs as well.

$ bundle exec vagrant up
[stock-system-and-user-ubuntu-1204] Box opscode-ubuntu-12.04 was not found. Fetching box from specified URL...
[vagrant] Downloading with Vagrant::Downloaders::HTTP...
[vagrant] Downloading box: https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-ubuntu-12.04.box
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
[stock-system-and-user-ubuntu-1204] Importing base box 'opscode-ubuntu-12.04'...
[stock-system-and-user-ubuntu-1204] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.1.22
VirtualBox Version: 4.2.6
[stock-system-and-user-ubuntu-1204] Matching MAC address for NAT networking...
[stock-system-and-user-ubuntu-1204] Clearing any previously set forwarded ports...
[stock-system-and-user-ubuntu-1204] Forwarding ports...
[stock-system-and-user-ubuntu-1204] -- 22 => 2222 (adapter 1)
[Berkshelf] installing cookbooks...
[Berkshelf] Using rvm (0.9.1) at path: '/Users/cassiano/projects/chef-rvm'
[Berkshelf] Using apt (1.8.0)
[Berkshelf] Using yum (2.1.0)
[Berkshelf] Installing java (1.8.0) from git: 'git://github.com/crahan/java.git' with branch: 'default_java_fix'
[Berkshelf] Installing user (0.3.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
[Berkshelf] Using chef_gem (0.0.5)
[Berkshelf] Using windows (1.7.0)
[Berkshelf] Using chef_handler (1.1.4)
[stock-system-and-user-ubuntu-1204] Creating shared folders metadata...
[stock-system-and-user-ubuntu-1204] Clearing any previously set network interfaces...
[stock-system-and-user-ubuntu-1204] Running any VM customizations...
[stock-system-and-user-ubuntu-1204] Booting VM...
[stock-system-and-user-ubuntu-1204] Waiting for VM to boot. This can take a few minutes.
[stock-system-and-user-ubuntu-1204] VM booted and ready for use!
[stock-system-and-user-ubuntu-1204] Setting host name...
[stock-system-and-user-ubuntu-1204] Mounting shared folders...
[stock-system-and-user-ubuntu-1204] -- v-root: /vagrant
[stock-system-and-user-ubuntu-1204] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[stock-system-and-user-ubuntu-1204] -- v-csdb-2: /tmp/vagrant-chef-1/chef-solo-2/data_bags
[stock-system-and-user-ubuntu-1204] Running provisioner: Vagrant::Provisioners::ChefSolo...
[stock-system-and-user-ubuntu-1204] Generating chef JSON and uploading...
[stock-system-and-user-ubuntu-1204] Running chef-solo...
stdin: is not a tty
[2013-01-25T23:24:06+00:00] INFO: *** Chef 10.14.4 ***
[2013-01-25T23:24:06+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[user::data_bag]", "recipe[rvm::system]", "recipe[rvm::user]"] from JSON
[2013-01-25T23:24:06+00:00] INFO: Run List is [recipe[apt], recipe[user::data_bag], recipe[rvm::system], recipe[rvm::user]]
[2013-01-25T23:24:06+00:00] INFO: Run List expands to [apt, user::data_bag, rvm::system, rvm::user]
[2013-01-25T23:24:06+00:00] INFO: Starting Chef Run for stock-system-and-user-ubuntu-1204.vagrantup.com
[2013-01-25T23:24:06+00:00] INFO: Running start handlers
[2013-01-25T23:24:06+00:00] INFO: Start handlers complete.
[2013-01-25T23:24:07+00:00] INFO: Processing chef_gem[rvm] action install (rvm::default line 21)
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/rvm_chef_user_environment.rb:49: warning: class variable access from toplevel
[2013-01-25T23:24:21+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-01-25T23:24:32+00:00] INFO: execute[apt-get-update] ran successfully
[2013-01-25T23:24:32+00:00] INFO: Processing execute[apt-get update] action nothing (apt::default line 29)
[2013-01-25T23:24:32+00:00] INFO: Processing execute[apt-get autoremove] action nothing (apt::default line 36)
[2013-01-25T23:24:32+00:00] INFO: Processing execute[apt-get autoclean] action nothing (apt::default line 42)
[2013-01-25T23:24:32+00:00] INFO: Processing package[update-notifier-common] action install (apt::default line 48)
[2013-01-25T23:24:35+00:00] INFO: package[update-notifier-common] sending run action to execute[apt-get-update] (immediate)
[2013-01-25T23:24:35+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-01-25T23:24:42+00:00] INFO: execute[apt-get-update] ran successfully
[2013-01-25T23:24:42+00:00] INFO: Processing execute[apt-get-update-periodic] action run (apt::default line 52)
[2013-01-25T23:24:42+00:00] INFO: Processing directory[/var/cache/local] action create (apt::default line 62)
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local] created directory /var/cache/local
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local] owner changed to 0
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local] group changed to 0
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local] mode changed to 755
[2013-01-25T23:24:42+00:00] INFO: Processing directory[/var/cache/local/preseeding] action create (apt::default line 62)
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local/preseeding] created directory /var/cache/local/preseeding
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local/preseeding] owner changed to 0
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local/preseeding] group changed to 0
[2013-01-25T23:24:42+00:00] INFO: directory[/var/cache/local/preseeding] mode changed to 755
[2013-01-25T23:24:42+00:00] INFO: Processing user_account[wigglebottom] action create (user::data_bag line 36)
[2013-01-25T23:24:42+00:00] INFO: Processing user[wigglebottom] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 94)
[2013-01-25T23:24:43+00:00] INFO: user[wigglebottom] created
[2013-01-25T23:24:43+00:00] INFO: Processing directory[/home/wigglebottom/.ssh] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 114)
[2013-01-25T23:24:43+00:00] INFO: directory[/home/wigglebottom/.ssh] created directory /home/wigglebottom/.ssh
[2013-01-25T23:24:43+00:00] INFO: directory[/home/wigglebottom/.ssh] owner changed to 1000
[2013-01-25T23:24:43+00:00] INFO: directory[/home/wigglebottom/.ssh] group changed to 1001
[2013-01-25T23:24:43+00:00] INFO: directory[/home/wigglebottom/.ssh] mode changed to 700
[2013-01-25T23:24:43+00:00] INFO: Processing directory[/home/wigglebottom] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 114)
[2013-01-25T23:24:43+00:00] INFO: directory[/home/wigglebottom] mode changed to 2755
[2013-01-25T23:24:43+00:00] INFO: Processing template[/home/wigglebottom/.ssh/authorized_keys] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 130)
[2013-01-25T23:24:43+00:00] INFO: template[/home/wigglebottom/.ssh/authorized_keys] updated content
[2013-01-25T23:24:43+00:00] INFO: template[/home/wigglebottom/.ssh/authorized_keys] owner changed to 1000
[2013-01-25T23:24:43+00:00] INFO: template[/home/wigglebottom/.ssh/authorized_keys] group changed to 1001
[2013-01-25T23:24:43+00:00] INFO: template[/home/wigglebottom/.ssh/authorized_keys] mode changed to 600
[2013-01-25T23:24:43+00:00] INFO: Processing execute[create ssh keypair for wigglebottom] action run (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 148)
[2013-01-25T23:24:43+00:00] INFO: execute[create ssh keypair for wigglebottom] ran successfully
[2013-01-25T23:24:43+00:00] INFO: Processing user[wigglebottom] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 94)
[2013-01-25T23:24:43+00:00] INFO: Processing directory[/home/wigglebottom/.ssh] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 114)
[2013-01-25T23:24:43+00:00] INFO: Processing directory[/home/wigglebottom] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 114)
[2013-01-25T23:24:43+00:00] INFO: Processing template[/home/wigglebottom/.ssh/authorized_keys] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 130)
[2013-01-25T23:24:43+00:00] INFO: Processing execute[create ssh keypair for wigglebottom] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/user/providers/account.rb line 148)
[2013-01-25T23:24:43+00:00] INFO: Processing chef_gem[rvm] action install (rvm::default line 21)
[2013-01-25T23:24:43+00:00] INFO: Processing package[sed] action install (rvm::system_install line 45)
[2013-01-25T23:24:43+00:00] INFO: Processing package[grep] action install (rvm::system_install line 45)
[2013-01-25T23:24:43+00:00] INFO: Processing package[tar] action install (rvm::system_install line 45)
[2013-01-25T23:24:43+00:00] INFO: Processing package[gzip] action install (rvm::system_install line 45)
[2013-01-25T23:24:43+00:00] INFO: Processing package[bzip2] action install (rvm::system_install line 45)
[2013-01-25T23:24:43+00:00] INFO: Processing package[bash] action install (rvm::system_install line 45)
[2013-01-25T23:24:43+00:00] INFO: Processing package[curl] action install (rvm::system_install line 45)
[2013-01-25T23:24:48+00:00] INFO: Processing package[git-core] action install (rvm::system_install line 45)
[2013-01-25T23:25:01+00:00] INFO: Processing template[/etc/rvmrc] action create (rvm::system_install line 144)
[2013-01-25T23:25:01+00:00] INFO: template[/etc/rvmrc] updated content
[2013-01-25T23:25:01+00:00] INFO: template[/etc/rvmrc] owner changed to 0
[2013-01-25T23:25:01+00:00] INFO: template[/etc/rvmrc] mode changed to 644
[2013-01-25T23:25:01+00:00] INFO: Processing log[Performing RVM install with [curl -L https://get.rvm.io | bash  -s -- --branch stable --version head] (as root)] action write (rvm::system_install line 76)
[2013-01-25T23:25:01+00:00] INFO: Performing RVM install with [curl -L https://get.rvm.io | bash  -s -- --branch stable --version head] (as root)
[2013-01-25T23:25:01+00:00] INFO: Processing execute[install system-wide RVM] action run (rvm::system_install line 78)
[2013-01-25T23:25:22+00:00] INFO: execute[install system-wide RVM] ran successfully
[2013-01-25T23:25:22+00:00] INFO: Processing execute[upgrade system-wide RVM to none] action run (rvm::system_install line 114)
[2013-01-25T23:25:22+00:00] INFO: Processing rvm_default_ruby[ruby-1.9.3-p327] action create (rvm::system line 184)
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/rvm_chef_user_environment.rb:32: warning: class variable access from toplevel
[2013-01-25T23:25:23+00:00] INFO: Processing rvm_environment[ruby-1.9.3-p327] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/default_ruby.rb line 37)
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/rvm_chef_user_environment.rb:32: warning: class variable access from toplevel
[2013-01-25T23:25:23+00:00] INFO: Processing rvm_ruby[ruby-1.9.3-p327] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/environment.rb line 70)
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/rvm_chef_user_environment.rb:32: warning: class variable access from toplevel
[2013-01-25T23:25:23+00:00] INFO: Processing package[build-essential] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:23+00:00] INFO: Processing package[openssl] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:23+00:00] INFO: Processing package[libreadline6] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:23+00:00] INFO: Processing package[libreadline6-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:23+00:00] INFO: Processing package[zlib1g] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:23+00:00] INFO: Processing package[zlib1g-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:23+00:00] INFO: Processing package[libssl-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:23+00:00] INFO: Processing package[libyaml-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:27+00:00] INFO: Processing package[libsqlite3-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:30+00:00] INFO: Processing package[sqlite3] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:33+00:00] INFO: Processing package[libxml2-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:40+00:00] INFO: Processing package[libxslt-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:40+00:00] INFO: package[libxslt-dev] is a virtual package, actually acting on package[libxslt1-dev]
[2013-01-25T23:25:46+00:00] INFO: Processing package[autoconf] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:52+00:00] INFO: Processing package[libc6-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:52+00:00] INFO: Processing package[ncurses-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:52+00:00] INFO: package[ncurses-dev] is a virtual package, actually acting on package[libncurses5-dev]
[2013-01-25T23:25:54+00:00] INFO: Processing package[automake] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:25:54+00:00] INFO: Processing package[libtool] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:26:00+00:00] INFO: Processing package[bison] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:26:04+00:00] INFO: Processing package[ssl-cert] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-25T23:26:06+00:00] INFO: Building rvm_ruby[ruby-1.9.3-p327], this could take awhile...
@lisimba
Copy link

lisimba commented Jan 26, 2013

I'm having the same issue.

I also tried a manual "rvm install ruby-1.9.3-p374" on the same box and it also fails with the output below. Maybe this is the root of the problem? I'm not sure.

rvm install ruby-1.9.3-p374
Searching for binary rubies, this might take some time.
ruby-1.9.3-p374 - #configure
ruby-1.9.3-p374 - #download
Archive checksum did not match, downloading again.
rm: cannot remove `bin-ruby-1.9.3-p374.tar.bz2': Permission denied
curl: Can't open 'bin-ruby-1.9.3-p374.tar.bz2'!
curl: try 'curl --help' or 'curl --manual' for more information
There was an error(23), please check /usr/local/rvm/log//*.log. Next we'll try to fetch via http.
Trying ftp:// URL instead.
curl: Can't open 'bin-ruby-1.9.3-p374.tar.bz2'!
curl: try 'curl --help' or 'curl --manual' for more information
There was an error(23), please check /usr/local/rvm/log//*.log
Downloading https://rvm.io/binaries/ubuntu/10.04/i386/ruby-1.9.3-p374.tar.bz2 failed.
Mounting remote ruby failed, trying to compile.
Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives
Warning: Failed to create the file yaml-0.1.4.tar.gz
##                                                                         3.4%
curl: (23) Failed writing body (0 != 16150)
There was an error(23), please check /usr/local/rvm/log//*.log. Next we'll try to fetch via http.
Trying ftp:// URL instead.
Warning: Failed to create the file yaml-0.1.4.tar.gz
##                                                                         3.4%
curl: (23) Failed writing body (0 != 16150)
There was an error(23), please check /usr/local/rvm/log//*.log
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p374, this may take a while depending on your cpu(s)...
ruby-1.9.3-p374 - #downloading ruby-1.9.3-p374, this may take a while depending on your connection...
Warning: Failed to create the file ruby-1.9.3-p374.tar.bz2
                                                                           0.0%
curl: (23) Failed writing body (0 != 1100)
There was an error(23), please check /usr/local/rvm/log//*.log. Next we'll try to fetch via http.
Trying ftp:// URL instead.
curl: (6) Couldn't resolve host 'ftp:'
There was an error(6), please check /usr/local/rvm/log//*.log
There has been an error fetching the ruby interpreter. Halting the installation.

@c10l
Copy link
Author

c10l commented Jan 26, 2013

@lisimba: It looks like you're trying to manually install as a regular user? Have you tried as root? I ask because I can install as root, and after doing that the next chef-run works (supposedly because it doesn't try to install ruby as it's already there).

@fnichol
Copy link
Contributor

fnichol commented Jan 27, 2013

This took a painfully long time to track down, but I'm fairly sure that it is because of rvm/rvm@7e0cad5. The previous commit (rvm/rvm@b5be604) works (doesn't block on curl) and the next commit (rvm/rvm@0e21380) also breaks on the curl command.

/cc @mpapis (I'll follow up in #rvm)

@finack
Copy link

finack commented Jan 27, 2013

Is there a work around for this? Curl is hanging on Ubuntu 10.04 via RVM 1.18.3. Let me know if there is anything I can try...

@mo-nathan
Copy link

Not sure if this will help, but I was able to get it to do a temporary work around in my case by going to the directory on my vagrant VM where the curl action happens (find the process id with 'ps -leaf | grep curl' then 'cd /proc/<process#>/cwd'), killing the curl process, and then running the curl command given by ps. Then exit out of the running vagrant process where ever that is with a double control-C and restart with 'vagrant provision'. I expect there are better work arounds along similar lines, but this enough for me at the moment.

@mpapis
Copy link
Contributor

mpapis commented Jan 27, 2013

could someone try with:

rvm get branch /bugfix/curl_hanging_chef-rvm_136_and_157
command rvm install 1.9.3

it's important to prefix with commad as it switches RVM to binary mode which is part of the fix.

the fix is waiting to merge here: rvm/rvm#1474

@mo-nathan
Copy link

I'm not sure what you mean by 'try' in this case. What I did was remove 'chef.add_recipe("rvm::system")' from my Vagrantfile (available from https://github.com/MushroomObserver/developer-startup). After a successful 'vagrant up', I did the following:

apt-get install curl
curl -L https://get.rvm.io | bash -s stable --ruby
source /usr/local/rvm/scripts/rvm
rvm uninstall 1.9.3
rvm install 1.9.3
rvm uninstall 1.9.3
rvm get branch /bugfix/curl_hanging_chef-rvm_136_and_157
command rvm install 1.9.3

All of these commands succeeded with no hangs. I'm essentially brand new to chef and vagrant, so don't fully get cookbooks yet. This means I haven't figured out how to integrate your commands into the vagrant process which is currently hanging. Specifically I haven't found the equivalent of 'rvm install 1.9.3' which I think you are suggesting replacing with your commands.

If you can be more specific about what I should try I'd be happy to give it a go.

@fnichol
Copy link
Contributor

fnichol commented Jan 27, 2013

It looks like rvm/rvm#1474 resolves this issue, yay!

@fnichol
Copy link
Contributor

fnichol commented Jan 27, 2013

Note that to test this I've been setting:

node['rvm']['branch'] = "wayneeseguin/bugfix/curl_hanging_chef-rvm_136_and_157"

@mpapis
Copy link
Contributor

mpapis commented Jan 27, 2013

the fix is merged already to head, should be in stable today

@fnichol
Copy link
Contributor

fnichol commented Jan 27, 2013

@mpapis great to hear!

@fnichol
Copy link
Contributor

fnichol commented Jan 27, 2013

For anyone else on this issue who is waiting on stable, you should be able to work around this issue by pinning to an older version:

node['rvm']['version'] = "1.17.10"

or use the master branch:

node['rvm'][branch'] = "master"

@toobulkeh
Copy link

thanks for the quick help and fix fnichol. Just to confirm that the stable is rvm which is pulled by chef-rvm on runtime? or does an association within chef-rvm need to be updated as well?

Thanks again!

@fnichol
Copy link
Contributor

fnichol commented Jan 28, 2013

@toobulkeh sorry, I was referring to rvm's stable branch which is used by default in chef-rvm. At this point master on chef-rvm should be able to build rubies again once rvm's stable branch is updated.

I suppose we should wait until those changes hit rvm's stable branch before closing this issue? I bet there are 3-4 other issues that can be closed related at this point. Thanks everyone for your feedback!

@finack
Copy link

finack commented Jan 28, 2013

@fnichol I tried to use node['rvm']['branch'] = "master" but still hanging on the curl. Running RVM version 1.18.3 from master. Do I need to also update chef-rvm? chef-rvm is version 0.9.1 or git submodule thinks v0.9.0-28-g4a5a753.

Here is what I see in ps

0     0 11210 11194  20   0  18428  2376 wait   S    ?   0:00 bash /usr/local/rvm/scripts/fetch http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.bz2
0     0 11264 11210  20   0  65504  3140 pipe_w S    ?  0:00 curl -f -L --create-dirs -C - -o ruby-1.8.7-p352.tar.bz2 --progress-bar http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.bz2

@c10l
Copy link
Author

c10l commented Jan 28, 2013

@finack: same here. I tried both setting recommended by @fnichol (branch stable and version 1.17.10), but neither worked.

@c10l
Copy link
Author

c10l commented Jan 28, 2013

Guess I spoke too soon, I must have done something wrong before, but now setting ['rvm']['branch'] to stable works. No other changes needed.
Seems like it hasn't been released yet, though, as not setting the branch to master still hangs. I believe this issue can be closed since the bug is in rvm, not in this cookbook, and it's already been fixed. :)

@c10l c10l closed this as completed Jan 28, 2013
@ramontayag
Copy link

What got me is that you have to set node['rvm']['branch'] = "none" when specifying a version. Hope this saves someone some time.

@mpapis
Copy link
Contributor

mpapis commented Jan 28, 2013

@ramontayag why not just comment it out?

@toobulkeh
Copy link

@mpapis @fnichol - using master branch this morning, got some nice different output. It was working last night. I checked the stable release, and it's not been updated yet with this 'fix' - but master is.

[2013-01-28T14:35:34+00:00] INFO: Processing log[Performing RVM install with [curl -L https://get.rvm.io | bash  -s -- --branch master --version head] (as root)] action write (rvm::system_install line 76)
[2013-01-28T14:35:34+00:00] INFO: Performing RVM install with [curl -L https://get.rvm.io | bash  -s -- --branch master --version head] (as root)
[2013-01-28T14:35:34+00:00] INFO: Processing execute[install system-wide RVM] action run (rvm::system_install line 78)

================================================================================

Error executing action `run` on resource 'execute[install system-wide RVM]'

================================================================================


Mixlib::ShellOut::ShellCommandFailed

------------------------------------

Expected process to exit with [0], but received '2'
---- Begin output of curl -L https://get.rvm.io | bash  -s -- --branch master --version head ----
STDOUT: 
STDERR: % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0    393      0 --:--:-- --:--:-- --:--:--   540
  0 62354    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `<!DOCTYPE html>'
---- End output of curl -L https://get.rvm.io | bash  -s -- --branch master --version head ----
Ran curl -L https://get.rvm.io | bash  -s -- --branch master --version head returned 2


Resource Declaration:

---------------------

# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb

 77: 
 78:         i = execute exec_name do
 79:           user    install_user
 80:           command install_command
 81:           environment(exec_env)
 82: 
 83:           # excute in compile phase if gem_package recipe is requested
 84:           if install_now
 85:             action :nothing
 86:           else
 87:             action :run
 88:           end
 89: 

Compiled Resource:

------------------

# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb:78:in `install_rvm'

execute("install system-wide RVM") do
  retry_delay 2
  environment {"TERM"=>"dumb"}
  user "root"
  returns 0
  command "curl -L https://get.rvm.io | bash  -s -- --branch master --version head"
  retries 0
  recipe_name "system_install"
  action [:run]
  cookbook_name :rvm
  backup 5
  not_if "bash -c "source /etc/profile.d/rvm.sh && type rvm | cat | head -1 | grep -q '^rvm is a function$'""
end

[2013-01-28T14:35:35+00:00] ERROR: Running exception handlers
[2013-01-28T14:35:35+00:00] ERROR: Exception handlers complete
[2013-01-28T14:35:35+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-01-28T14:35:35+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[install system-wide RVM] (rvm::system_install line 78) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of curl -L https://get.rvm.io | bash  -s -- --branch master --version head ----
STDOUT: 
STDERR: % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0    393      0 --:--:-- --:--:-- --:--:--   540
  0 62354    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `<!DOCTYPE html>'
---- End output of curl -L https://get.rvm.io | bash  -s -- --branch master --version head ----
Ran curl -L https://get.rvm.io | bash  -s -- --branch master --version head returned 2
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

@toobulkeh
Copy link

Pinning to version 1.17.10:

node['rvm']['version'] = "1.17.10"

or in my case:

set['rvm']['version'] = "1.17.10"

fixed this issue.

@mpapis
Copy link
Contributor

mpapis commented Jan 28, 2013

@toobulkeh the problem with bash: line 1: '` is something new - it looks like redirection error, is this somethign you can reproduce or it was one time problem?

@toobulkeh
Copy link

I could try and reproduce it. What extra logging would you like turned on? Or extra commands run?

@mpapis
Copy link
Contributor

mpapis commented Jan 28, 2013

try it, if ti fails could you gist output from curl -L https://get.rvm.io -- if it's not a shell script

@toobulkeh
Copy link

curl -L https://get.rvm.io returns the normal bash script.

curl -L https://get.rvm.io | bash -s -- --branch master --version head tried to update as it should. I guess it was a one time redirect error. My apologies.

@ramontayag
Copy link

@mpapis, sorry not sure what you mean. Comment what out?

@mpapis
Copy link
Contributor

mpapis commented Jan 28, 2013

@ramontayag:

node['rvm']['branch'] = ...

@ramontayag
Copy link

@mpapis, not specifying the branch or version caused this bug (at least as of a few hours ago).

@mpapis
Copy link
Contributor

mpapis commented Jan 28, 2013

@ramontayag but you do not have to specify branch none when you set version?

@c10l
Copy link
Author

c10l commented Jan 28, 2013

I can confirm that specifying both branch = none and version = 1.17.10 work; without setting branch = none it hangs.

@ramontayag
Copy link

@mpapis, oh I saw it in the readme: http://grab.by/jogs

@mpapis
Copy link
Contributor

mpapis commented Jan 28, 2013

that's a fail in the algorithm, it should be possible to specify one without "resetting" another - @fnichol is that chef limitation or just how default is handled right now?

@toobulkeh
Copy link

@mpapis - the default branch is stable. so no branch defined (default) is stable but setting branch to none is the same as master, iirc. See https://github.com/fnichol/chef-rvm#-branch for the README.md

@fnichol
Copy link
Contributor

fnichol commented Jan 28, 2013

@mpapis - looking back this may have been setup because of the installer flags at the time. I fixed this up last week so that an "x.y.z" version string will drop the branch flag (#152). I also added some test coverage to catch any regressions: https://github.com/fnichol/chef-rvm/blob/master/test/unit/chef/rvm/recipe_helpers_spec.rb#L41-L72

@mpapis
Copy link
Contributor

mpapis commented Jan 28, 2013

released stable - 1.18.4 all should be fine now I guess - let me know if it is not

@toobulkeh
Copy link

1 second to install RVM and 14 seconds to install latest ruby with RVM on my MBP vagrant VM provisioning. Looks like 1.18.4 works well (at least for the hang I was seeing... someone else might've had another type of hang somewhere else). I'll push changes to my chef-rails cookbook. Thanks for the work @mpapis and @fnichol.

~/Projects/rails-dev-box[master*]% vagrant up
[default] Importing base box 'precise32'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.2.6
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 3000 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Setting host name...
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] Running provisioner: Vagrant::Provisioners::ChefSolo...
[default] Generating chef JSON and uploading...
[default] Running chef-solo...
stdin: is not a tty
[2013-01-28T21:11:37+00:00] INFO: *** Chef 10.14.2 ***
[2013-01-28T21:11:37+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[build-essential]", "recipe[git]", "recipe[rails::rvm]", "recipe[rvm::vagrant]", "recipe[nodejs::install_from_package]"] from JSON
[2013-01-28T21:11:37+00:00] INFO: Run List is [recipe[apt], recipe[build-essential], recipe[git], recipe[rails::rvm], recipe[rvm::vagrant], recipe[nodejs::install_from_package]]
[2013-01-28T21:11:37+00:00] INFO: Run List expands to [apt, build-essential, git, rails::rvm, rvm::vagrant, nodejs::install_from_package]
[2013-01-28T21:11:37+00:00] INFO: Starting Chef Run for rails-dev-box
[2013-01-28T21:11:37+00:00] INFO: Running start handlers
[2013-01-28T21:11:37+00:00] INFO: Start handlers complete.
[2013-01-28T21:11:37+00:00] INFO: Processing chef_gem[rvm] action install (rvm::default line 21)
[2013-01-28T21:11:39+00:00] INFO: Installing Rails using RVM.
[2013-01-28T21:11:39+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-01-28T21:11:41+00:00] INFO: execute[apt-get-update] ran successfully
[2013-01-28T21:11:41+00:00] INFO: Processing execute[apt-get update] action nothing (apt::default line 29)
[2013-01-28T21:11:41+00:00] INFO: Processing execute[apt-get autoremove] action nothing (apt::default line 36)
[2013-01-28T21:11:41+00:00] INFO: Processing execute[apt-get autoclean] action nothing (apt::default line 42)
[2013-01-28T21:11:41+00:00] INFO: Processing package[update-notifier-common] action install (apt::default line 48)
[2013-01-28T21:11:42+00:00] INFO: package[update-notifier-common] sending run action to execute[apt-get-update] (immediate)
[2013-01-28T21:11:42+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-01-28T21:11:44+00:00] INFO: execute[apt-get-update] ran successfully
[2013-01-28T21:11:44+00:00] INFO: Processing execute[apt-get-update-periodic] action run (apt::default line 52)
[2013-01-28T21:11:44+00:00] INFO: Processing directory[/var/cache/local] action create (apt::default line 62)
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local] created directory /var/cache/local
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local] owner changed to 0
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local] group changed to 0
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local] mode changed to 755
[2013-01-28T21:11:44+00:00] INFO: Processing directory[/var/cache/local/preseeding] action create (apt::default line 62)
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local/preseeding] created directory /var/cache/local/preseeding
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local/preseeding] owner changed to 0
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local/preseeding] group changed to 0
[2013-01-28T21:11:44+00:00] INFO: directory[/var/cache/local/preseeding] mode changed to 755
[2013-01-28T21:11:44+00:00] INFO: Processing package[build-essential] action install (build-essential::default line 51)
[2013-01-28T21:11:48+00:00] INFO: Processing package[binutils-doc] action install (build-essential::default line 51)
[2013-01-28T21:11:49+00:00] INFO: Processing package[autoconf] action install (build-essential::default line 58)
[2013-01-28T21:11:50+00:00] INFO: Processing package[flex] action install (build-essential::default line 58)
[2013-01-28T21:11:51+00:00] INFO: Processing package[bison] action install (build-essential::default line 58)
[2013-01-28T21:11:52+00:00] INFO: Processing package[git-core] action install (git::default line 21)
[2013-01-28T21:11:55+00:00] INFO: Processing chef_gem[rvm] action install (rvm::default line 21)
[2013-01-28T21:11:55+00:00] INFO: Processing package[sed] action install (rvm::system_install line 45)
[2013-01-28T21:11:55+00:00] INFO: Processing package[grep] action install (rvm::system_install line 45)
[2013-01-28T21:11:56+00:00] INFO: Processing package[tar] action install (rvm::system_install line 45)
[2013-01-28T21:11:56+00:00] INFO: Processing package[gzip] action install (rvm::system_install line 45)
[2013-01-28T21:11:56+00:00] INFO: Processing package[bzip2] action install (rvm::system_install line 45)
[2013-01-28T21:11:56+00:00] INFO: Processing package[bash] action install (rvm::system_install line 45)
[2013-01-28T21:11:56+00:00] INFO: Processing package[curl] action install (rvm::system_install line 45)
[2013-01-28T21:11:57+00:00] INFO: Processing package[git-core] action install (rvm::system_install line 45)
[2013-01-28T21:11:57+00:00] INFO: Processing template[/etc/rvmrc] action create (rvm::system_install line 144)
[2013-01-28T21:11:57+00:00] INFO: template[/etc/rvmrc] updated content
[2013-01-28T21:11:57+00:00] INFO: template[/etc/rvmrc] owner changed to 0
[2013-01-28T21:11:57+00:00] INFO: template[/etc/rvmrc] mode changed to 644
[2013-01-28T21:11:57+00:00] INFO: Processing log[Performing RVM install with [curl -L https://get.rvm.io | bash  -s -- --version 1.18.4] (as root)] action write (rvm::system_install line 76)
[2013-01-28T21:11:57+00:00] INFO: Performing RVM install with [curl -L https://get.rvm.io | bash  -s -- --version 1.18.4] (as root)
[2013-01-28T21:11:57+00:00] INFO: Processing execute[install system-wide RVM] action run (rvm::system_install line 78)
[2013-01-28T21:12:01+00:00] INFO: execute[install system-wide RVM] ran successfully
[2013-01-28T21:12:01+00:00] INFO: Processing execute[upgrade system-wide RVM to none] action run (rvm::system_install line 114)
[2013-01-28T21:12:01+00:00] INFO: Processing rvm_default_ruby[ruby-1.9.3-p327] action create (rvm::system line 184)
[2013-01-28T21:12:01+00:00] INFO: Processing rvm_environment[ruby-1.9.3-p327] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/default_ruby.rb line 37)
[2013-01-28T21:12:01+00:00] INFO: Processing rvm_ruby[ruby-1.9.3-p327] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/environment.rb line 70)
[2013-01-28T21:12:02+00:00] INFO: Processing package[build-essential] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:02+00:00] INFO: Processing package[openssl] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:02+00:00] INFO: Processing package[libreadline6] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:02+00:00] INFO: Processing package[libreadline6-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:02+00:00] INFO: Processing package[zlib1g] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:02+00:00] INFO: Processing package[zlib1g-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:02+00:00] INFO: Processing package[libssl-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:02+00:00] INFO: Processing package[libyaml-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:03+00:00] INFO: Processing package[libsqlite3-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:04+00:00] INFO: Processing package[sqlite3] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:04+00:00] INFO: Processing package[libxml2-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:06+00:00] INFO: Processing package[libxslt-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:06+00:00] INFO: package[libxslt-dev] is a virtual package, actually acting on package[libxslt1-dev]
[2013-01-28T21:12:08+00:00] INFO: Processing package[autoconf] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:08+00:00] INFO: Processing package[libc6-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:08+00:00] INFO: Processing package[ncurses-dev] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:08+00:00] INFO: package[ncurses-dev] is a virtual package, actually acting on package[libncurses5-dev]
[2013-01-28T21:12:09+00:00] INFO: Processing package[automake] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:09+00:00] INFO: Processing package[libtool] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:10+00:00] INFO: Processing package[bison] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:10+00:00] INFO: Processing package[ssl-cert] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:11+00:00] INFO: Building rvm_ruby[ruby-1.9.3-p327], this could take awhile...
[2013-01-28T21:12:25+00:00] INFO: Installation of rvm_ruby[ruby-1.9.3-p327] was successful.
[2013-01-28T21:12:25+00:00] INFO: Importing initial gemsets for rvm_ruby[ruby-1.9.3-p327]
[2013-01-28T21:12:27+00:00] INFO: rvm_ruby[ruby-1.9.3-p327] build time was 0.423694233333333 minutes.
[2013-01-28T21:12:27+00:00] INFO: Setting default ruby to rvm_ruby[ruby-1.9.3-p327]
[2013-01-28T21:12:27+00:00] INFO: Processing rvm_environment[ruby-1.9.3-p327] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/default_ruby.rb line 37)
[2013-01-28T21:12:27+00:00] INFO: Processing rvm_ruby[ruby-1.9.3-p327] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/environment.rb line 70)
[2013-01-28T21:12:27+00:00] INFO: Processing package[build-essential] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:27+00:00] INFO: Processing package[openssl] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libreadline6] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libreadline6-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[zlib1g] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[zlib1g-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libssl-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libyaml-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libsqlite3-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[sqlite3] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libxml2-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libxslt-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: package[libxslt-dev] is a virtual package, actually acting on package[libxslt1-dev]
[2013-01-28T21:12:28+00:00] INFO: Processing package[autoconf] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libc6-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[ncurses-dev] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: package[ncurses-dev] is a virtual package, actually acting on package[libncurses5-dev]
[2013-01-28T21:12:28+00:00] INFO: Processing package[automake] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[libtool] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[bison] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing package[ssl-cert] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/ruby.rb line 172)
[2013-01-28T21:12:28+00:00] INFO: Processing rvm_global_gem[bundler] action install (rvm::system line 190)
[2013-01-28T21:12:28+00:00] INFO: Processing execute[Add bundler to /usr/local/rvm/gemsets/global.gems] action run (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/global_gem.rb line 79)
[2013-01-28T21:12:28+00:00] INFO: Processing rvm_gem[bundler] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/global_gem.rb line 48)
[2013-01-28T21:12:29+00:00] INFO: Processing execute[Add bundler to /usr/local/rvm/gemsets/global.gems] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/global_gem.rb line 79)
[2013-01-28T21:12:29+00:00] INFO: Processing rvm_gem[bundler] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/global_gem.rb line 48)
[2013-01-28T21:12:29+00:00] INFO: Processing group[rvm] action create (rvm::system line 33)
[2013-01-28T21:12:29+00:00] INFO: group[rvm] altered
[2013-01-28T21:12:29+00:00] INFO: Processing rvm_gem[rails] action install (rails::rvm line 4)
[2013-01-28T21:12:30+00:00] INFO: Processing rvm_environment[default] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/rvm_rubygems_package.rb line 129)
[2013-01-28T21:12:58+00:00] INFO: Processing rvm_environment[default] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/libraries/rvm_rubygems_package.rb line 129)
[2013-01-28T21:12:58+00:00] INFO: Processing template[/usr/local/bin/chef-client] action create (rvm::vagrant line 20)
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-client] updated content
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-client] owner changed to 0
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-client] group changed to 0
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-client] mode changed to 755
[2013-01-28T21:12:58+00:00] INFO: Processing template[/usr/local/bin/chef-solo] action create (rvm::vagrant line 27)
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-solo] updated content
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-solo] owner changed to 0
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-solo] group changed to 0
[2013-01-28T21:12:58+00:00] INFO: template[/usr/local/bin/chef-solo] mode changed to 755
[2013-01-28T21:12:58+00:00] INFO: Processing group[rvm] action create (rvm::vagrant line 34)
[2013-01-28T21:12:58+00:00] INFO: Processing apt_repository[node.js] action add (nodejs::install_from_package line 39)
[2013-01-28T21:12:58+00:00] INFO: Processing execute[install-key C7917B12] action run (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 27)
[2013-01-28T21:12:59+00:00] INFO: execute[install-key C7917B12] ran successfully
[2013-01-28T21:12:59+00:00] INFO: Processing execute[install-key C7917B12] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 27)
[2013-01-28T21:12:59+00:00] INFO: Processing execute[apt-get update] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 96)
[2013-01-28T21:12:59+00:00] INFO: Processing file[/var/lib/apt/periodic/update-success-stamp] action nothing (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 101)
[2013-01-28T21:12:59+00:00] INFO: Processing file[/etc/apt/sources.list.d/node.js.list] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 112)
[2013-01-28T21:12:59+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] owner changed to 0
[2013-01-28T21:12:59+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] group changed to 0
[2013-01-28T21:12:59+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] mode changed to 644
[2013-01-28T21:12:59+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] created file /etc/apt/sources.list.d/node.js.list
[2013-01-28T21:12:59+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] sending delete action to file[/var/lib/apt/periodic/update-success-stamp] (immediate)
[2013-01-28T21:12:59+00:00] INFO: Processing file[/var/lib/apt/periodic/update-success-stamp] action delete (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 101)
[2013-01-28T21:12:59+00:00] INFO: file[/var/lib/apt/periodic/update-success-stamp] backed up to /var/chef/backup/var/lib/apt/periodic/update-success-stamp.chef-20130128211259
[2013-01-28T21:12:59+00:00] INFO: file[/var/lib/apt/periodic/update-success-stamp] deleted file at /var/lib/apt/periodic/update-success-stamp
[2013-01-28T21:12:59+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] sending run action to execute[apt-get update] (immediate)
[2013-01-28T21:12:59+00:00] INFO: Processing execute[apt-get update] action run (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb line 96)
[2013-01-28T21:13:01+00:00] INFO: execute[apt-get update] ran successfully
[2013-01-28T21:13:01+00:00] INFO: Processing package[nodejs] action install (nodejs::install_from_package line 49)
[2013-01-28T21:13:06+00:00] INFO: Processing package[npm] action install (nodejs::install_from_package line 49)
[2013-01-28T21:13:10+00:00] INFO: Chef Run complete in 92.521838 seconds
[2013-01-28T21:13:10+00:00] INFO: Running report handlers
[2013-01-28T21:13:10+00:00] INFO: Report handlers complete
~/Projects/rails-dev-box[master*]% 

@mo-nathan
Copy link

This is still hanging for after doing a vagrant destroy and a vagrant up. I also tried deleting the cookbooks directory and running 'librarian-chef install' as well as 'librarian-chef update'.

I tried adding setting the version explicitly to "none" both in the Vagrantfile with:

chef.add_recipe("rvm::system") # Currently hangs when trying to get the ruby source with curl.
chef.json[:rvm] = {
  :branch => 'none'
}

and directly in cookbooks/rvm/attributes/default.rb by changing:

default['rvm']['branch'] = "stable"

to

default['rvm']['branch'] = "none"

In both cases it seems to choke on the wayneeseguin with something to the effect of:

---- Begin output of curl -L https://get.rvm.io | bash -s -- --branch none --version head ----
STDOUT: Downloading RVM from wayneeseguin branch none
Could not extract RVM sources.
STDERR: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 236 0 --:--:-- --:--:-- --:--:-- 469
100 10648 100 10648 0 0 8628 0 0:00:01 0:00:01 --:--:-- 10.1M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 129 100 129 0 0 502 0 --:--:-- --:--:-- --:--:-- 837
7 129 7 10 0 0 18 0 0:00:07 --:--:-- 0:00:07 18

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
---- End output of curl -L https://get.rvm.io | bash -s -- --branch none --version head ----
Ran curl -L https://get.rvm.io | bash -s -- --branch none --version head returned 3
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

I ended up getting it to work by explicitly setting the version to "1.17.10" in cookbooks/rvm/attributes/default.rb.

@toobulkeh
Copy link

mo-nathan, this looks like an issue with RVM directly, not this gem hanging. That gzip failure means that rvm didn't download correctly using curl.

I suggest creating a new bug report over on that repository instead of trying to troubleshoot an unrelated issue here.

@mo-nathan
Copy link

toobulkey, thanks! This pushed me to look a bit deeper. After doing so, it appears that the problem with the proposed fix is that there isn't a "none" branch for RVM which doesn't really seem like an RVM problem. Note that you get the same error with any non-existant branch, e.g.

% curl -L https://get.rvm.io | bash -s -- --branch quackmoo --version head

However, having no branch does to the right thing.

So this means there is a problem with the fix not being in the "stable" branch, but even that doesn't completely seem like their problem.

However, I did find a vagrant based solution that seems to be working. Specifically add to the Vagrantfile:

chef.json[:rvm] = {
  :branch => nil
}

after chef.add_recipe("rvm::system").

This succeeded with no hang and installed version 1.18.5 of RVM.

@mpapis
Copy link
Contributor

mpapis commented Feb 3, 2013

@mo-nathan RVM has two base branches -> master (head) and stable - when you do not specfy branch it is master, when you specify an exact version - it is a tag version from git -> https://github.com/wayneeseguin/rvm/tags

@seanlinsley
Copy link

This is breaking again on 1.18.15 😦. At least 1.17.10 works...

@c10l
Copy link
Author

c10l commented Mar 4, 2013

I hate to say that, but it "works for me"™ :)
It also worked on 1.18.5, which is what I run in production.

@mpapis
Copy link
Contributor

mpapis commented Mar 4, 2013

@daxter maybe it is #159 ?

@seanlinsley
Copy link

@mpapis thanks for the tip

I'm using Librarian. Following this project's readme, I was using 0.9.0 (which happens to be 10 months old).

cookbook 'rvm', git: 'git://github.com/fnichol/chef-rvm', ref: 'v0.9.0'

After reading through #159, I can get 485e042 working with 10.18.5, but not with 10.18.15.

@mpapis
Copy link
Contributor

mpapis commented Mar 4, 2013

could you try to find which version broke it? It would help me in searching for a way to improve it as there was quite a lot changes in the commits - rvm/rvm@1.18.5...1.18.15

@seanlinsley
Copy link

Sure, I'll step through them. Is there a faster way to do so than vagrant destroy -f && vagrant up?

@mpapis
Copy link
Contributor

mpapis commented Mar 4, 2013

vagrant provision?

@seanlinsley
Copy link

I hadn't been using that because chef-solo couldn't be found, which was confusing because I was using the rvm::vagrant cookbook. Looks like now that I'm using 485e042 it's working properly.

EDIT: Scratch that. The provision command won't use the updated RVM version info.

@seanlinsley
Copy link

Looks like it specifically breaks when moving from .9 to .10

@seanlinsley
Copy link

Oh how about that. I had been setting default_ruby to ruby-1.9.3-p392 which RVM isn't aware about until .10.

So it was only failing in a different way.

@mpapis
Copy link
Contributor

mpapis commented Mar 4, 2013

open a new issue, it's most likely something new

@seanlinsley
Copy link

Something between 485e042 and (master) fixed my problem. With 37ae6f0 I can use RVM 1.18.15 and Ruby 1.9.3p392.

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
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

9 participants