1

bootstrapping a node like this: "knife solo cook username@servername"

The runlist includes this recipe, rubies.rb.

include_recipe 'rvm::system'
include_recipe 'rvm::gem_package'

rvm_gem "bundler" do
  ruby_string "ruby-2.1.1"
  action      :install
end

below is what i get for the failure.

  * execute[Add bundler to /opt/mount1/rvm/gemsets/global.gems] action nothing (skipped due to action :nothing)
  * group[rvm] action create (skipped due to only_if)
Recipe: project_jenkins::rubies
  * rvm_gem[bundler] action install

    ================================================================================
    Error executing action `install` on resource 'rvm_gem[bundler]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '2'
    ---- Begin output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
    STDOUT: 
    STDERR: Ruby ruby-2.1.1 is not installed.
    ---- End output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
    Ran bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" returned 2

    Cookbook Trace:
    ---------------
    /home/user/chef-solo/cookbooks-2/rvm/libraries/rvm_rubygems_package.rb:63:in `gem_paths'

    Resource Declaration:
    ---------------------
    # In /home/user/chef-solo/cookbooks-2/project_jenkins/recipes/rubies.rb

      4: rvm_gem "bundler" do
      5:   ruby_string "ruby-2.1.1"
      6:   action      :install
      7: end

    Compiled Resource:
    ------------------
    # Declared in /home/user/chef-solo/cookbooks-2/project_jenkins/recipes/rubies.rb:4:in `from_file'

    rvm_gem("bundler") do
      provider Chef::Provider::Package::RVMRubygems
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :rvm_gem
      cookbook_name :"project_jenkins"
      recipe_name "rubies"
      ruby_string "ruby-2.1.1"
      gem_binary "gem"
      package_name "bundler"
    end


Running handlers:
[2015-05-03T22:50:33-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-05-03T22:50:33-04:00] ERROR: Exception handlers complete
[2015-05-03T22:50:33-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 28 resources updated in 603.016790952 seconds
[2015-05-03T22:50:33-04:00] ERROR: rvm_gem[bundler] (project_jenkins::rubies line 4) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
STDOUT: 
STDERR: Ruby ruby-2.1.1 is not installed.
---- End output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
Ran bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" returned 2
[2015-05-03T22:50:33-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.

The version of chef-client doesn't matter, i tried upgrading the chef 12.3.0 from 11.16.4. The rvm cookbook version: "0.9.2" The platform is CentOS6.6

OK999
  • 1,353
  • 2
  • 19
  • 39
  • 1
    You might be running into this: https://github.com/martinisoft/chef-rvm/issues/283 – aaron blythe May 05 '15 at 05:24
  • yes it appears to be, although the logs are not the same. Strange that it worked this time when i re-rolled back to chef-client version 11.16.4. I started with this issue when the chef-client version was at 11.16.4, so i upgraded to 12.x.x. Anyways - i hope the cookbook is fixed soon. – OK999 May 05 '15 at 16:18

0 Answers0