-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Comments
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.
|
@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). |
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) |
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... |
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. |
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 the fix is waiting to merge here: rvm/rvm#1474 |
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 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. |
It looks like rvm/rvm#1474 resolves this issue, yay! |
Note that to test this I've been setting: node['rvm']['branch'] = "wayneeseguin/bugfix/curl_hanging_chef-rvm_136_and_157" |
the fix is merged already to |
@mpapis great to hear! |
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" |
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! |
@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! |
@fnichol I tried to use Here is what I see in ps
|
Guess I spoke too soon, I must have done something wrong before, but now setting ['rvm']['branch'] to stable works. No other changes needed. |
What got me is that you have to set |
@ramontayag why not just comment it out? |
@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.
|
Pinning to version 1.17.10:
or in my case:
fixed this issue. |
@toobulkeh the problem with |
I could try and reproduce it. What extra logging would you like turned on? Or extra commands run? |
try it, if ti fails could you gist output from |
|
@mpapis, sorry not sure what you mean. Comment what out? |
node['rvm']['branch'] = ... |
@mpapis, not specifying the branch or version caused this bug (at least as of a few hours ago). |
@ramontayag but you do not have to specify branch |
I can confirm that specifying both |
@mpapis, oh I saw it in the readme: http://grab.by/jogs |
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? |
@mpapis - the default branch is stable. so no branch defined (default) is |
@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 |
released stable - 1.18.4 all should be fine now I guess - let me know if it is not |
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.
|
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:
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 ---- gzip: stdin: not in gzip format I ended up getting it to work by explicitly setting the version to "1.17.10" in cookbooks/rvm/attributes/default.rb. |
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. |
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:
after chef.add_recipe("rvm::system"). This succeeded with no hang and installed version 1.18.5 of RVM. |
@mo-nathan RVM has two base branches -> |
This is breaking again on 1.18.15 😦. At least 1.17.10 works... |
I hate to say that, but it "works for me"™ :) |
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 |
Sure, I'll step through them. Is there a faster way to do so than |
|
I hadn't been using that because EDIT: Scratch that. The provision command won't use the updated RVM version info. |
Looks like it specifically breaks when moving from .9 to .10 |
Oh how about that. I had been setting So it was only failing in a different way. |
open a new issue, it's most likely something new |
Something between 485e042 and (master) fixed my problem. With 37ae6f0 I can use RVM 1.18.15 and Ruby 1.9.3p392. |
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. |
This cookbook is hanging during the ruby install.
How to reproduce:
The VM spins up, then hangs. I've been waiting for about 2 hours :)
This has happened on newly created EC2 VMs as well.
The text was updated successfully, but these errors were encountered: