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

Make work on centos by installing rvm gem into chef's embedded ruby. #126

Closed
wants to merge 1 commit into from

Conversation

jblatt-altiscale
Copy link

Confirmed this made Centos 6.2 work and confirmed it doesn't break Ubuntu 11.10

Without this fix you'll see this on Centos 6.2:

[2012-09-20T17:06:23-04:00] INFO: *** Chef 10.14.2 ***
[2012-09-20T17:06:24-04:00] INFO: Setting the run_list to ["role[jenkins_slave]"] from JSON
[2012-09-20T17:06:24-04:00] INFO: Run List is [role[jenkins_slave]]
[2012-09-20T17:06:24-04:00] INFO: Run List expands to [jenkins_slave]
[2012-09-20T17:06:24-04:00] INFO: Starting Chef Run for ip-10-252-90-98.us-west-2.compute.internal
[2012-09-20T17:06:24-04:00] INFO: Running start handlers
[2012-09-20T17:06:24-04:00] INFO: Start handlers complete.
[2012-09-20T17:06:24-04:00] INFO: Processing gem_package[rvm] action install (rvm::default line 21)

Recipe Compile Error in /tmp/exec/cookbooks/jenkins_slave/recipes/default.rb

LoadError

cannot load such file -- rvm

Cookbook Trace:

/tmp/exec/cookbooks/rvm/recipes/default.rb:27:in from_file' /tmp/exec/cookbooks/rvm/recipes/system_install.rb:20:infrom_file'
/tmp/exec/cookbooks/rvm/recipes/system.rb:20:in from_file' /tmp/exec/cookbooks/jenkins_slave/recipes/default.rb:4:infrom_file'

Relevant File Content:

/tmp/exec/cookbooks/rvm/recipes/default.rb:

1: #
2: # Cookbook Name:: rvm
3: # Recipe:: default
4: #
5: # Copyright 2010, 2011, Fletcher Nichol
6: #
7: # Licensed under the Apache License, Version 2.0 (the "License");
8: # you may not use this file except in compliance with the License.
9: # You may obtain a copy of the License at

[2012-09-20T17:06:25-04:00] ERROR: Running exception handlers
[2012-09-20T17:06:25-04:00] ERROR: Exception handlers complete
[2012-09-20T17:06:25-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2012-09-20T17:06:25-04:00] FATAL: LoadError: cannot load such file -- rvm

Confirmed this made Centos 6.2 work and confirmed it doesn't break Ubuntu 11.10

Without this fix you'll see this on Centos 6.2:

[2012-09-20T17:06:23-04:00] INFO: *** Chef 10.14.2 ***
[2012-09-20T17:06:24-04:00] INFO: Setting the run_list to ["role[jenkins_slave]"] from JSON
[2012-09-20T17:06:24-04:00] INFO: Run List is [role[jenkins_slave]]
[2012-09-20T17:06:24-04:00] INFO: Run List expands to [jenkins_slave]
[2012-09-20T17:06:24-04:00] INFO: Starting Chef Run for ip-10-252-90-98.us-west-2.compute.internal
[2012-09-20T17:06:24-04:00] INFO: Running start handlers
[2012-09-20T17:06:24-04:00] INFO: Start handlers complete.
[2012-09-20T17:06:24-04:00] INFO: Processing gem_package[rvm] action install (rvm::default line 21)

================================================================================
Recipe Compile Error in /tmp/exec/cookbooks/jenkins_slave/recipes/default.rb
================================================================================

LoadError
---------
cannot load such file -- rvm

Cookbook Trace:
---------------
  /tmp/exec/cookbooks/rvm/recipes/default.rb:27:in `from_file'
  /tmp/exec/cookbooks/rvm/recipes/system_install.rb:20:in `from_file'
  /tmp/exec/cookbooks/rvm/recipes/system.rb:20:in `from_file'
  /tmp/exec/cookbooks/jenkins_slave/recipes/default.rb:4:in `from_file'

Relevant File Content:
----------------------
/tmp/exec/cookbooks/rvm/recipes/default.rb:

  1:  #
  2:  # Cookbook Name:: rvm
  3:  # Recipe:: default
  4:  #
  5:  # Copyright 2010, 2011, Fletcher Nichol
  6:  #
  7:  # Licensed under the Apache License, Version 2.0 (the "License");
  8:  # you may not use this file except in compliance with the License.
  9:  # You may obtain a copy of the License at

[2012-09-20T17:06:25-04:00] ERROR: Running exception handlers
[2012-09-20T17:06:25-04:00] ERROR: Exception handlers complete
[2012-09-20T17:06:25-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2012-09-20T17:06:25-04:00] FATAL: LoadError: cannot load such file -- rvm
# make this work on centos
chef_gem 'rvm' do
action :nothing
end.run_action(:install)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this with chef_gem. It will run at compile time by default since it's aware these gems will be needed at convergence. I have a similar pull request at #125

@fnichol
Copy link
Contributor

fnichol commented Jan 15, 2013

Ah, thank you! @gondoi is correct and we have #125 merged now. If you're still getting convergence issues under centos then please either re-open or start a new issue. I'll have centos-6.3 under convergence/integration testing very shortly so I'm hopeful we don't get regressions like this in the future. Thank you!

@fnichol fnichol closed this Jan 15, 2013
@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

Successfully merging this pull request may close these issues.

3 participants