大家好
我在跑一个 ibm 的 chef 作业,后台报错,大概说要装 ibm jdk 的时候报错,我看了 jdk.rb,里面很简单,就是直接的安装,但是我疑惑的是 chef 是怎么知道去什么地方去找安装介质来安装 ibm jvm 的呢
1
后台报错
I, [2014-03-30T18:31:17.453454 #4360] INFO -- sc-deploy: exec_cmd.rb::run_cmd_log
'::#<Thread:0x7f4e493e7be8> 192.168.10.177 [Sun, 30 Mar 2014 18:31:17 +0800] INFO: service[openstack-iaasgateway] started
I, [2014-03-30T18:31:17.453659 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 [Sun, 30 Mar 2014 18:31:17 +0800] INFO: Processing package[ibm-java-x86_64-sdk] action install (java::jdk line 8)
I, [2014-03-30T18:55:43.982285 #4360] INFO -- sc-deploy: exec_cmd.rb::run_cmd_log'::#<Thread:0x7f4e493e7be8> 192.168.10.177 [Sun, 30 Mar 2014 18:55:43 +0800] ERROR: package[ibm-java-x86_64-sdk] (java::jdk line 8) has had an error
I, [2014-03-30T18:55:44.004903 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 [Sun, 30 Mar 2014 18:55:43 +0800] ERROR: packageibm-java-x86_64-sdk had an error:
I, [2014-03-30T18:55:44.005087 #4360] INFO -- sc-deploy: exec_cmd.rb::run_cmd_log'::#<Thread:0x7f4e493e7be8> 192.168.10.177 package[ibm-java-x86_64-sdk] (java::jdk line 8) had an error: Chef::Exceptions::Exec: returned 1, expected 0
I, [2014-03-30T18:55:44.005253 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/command.rb:127:in handle_command_failures'
I, [2014-03-30T18:55:44.005402 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/package/yum.rb:954:in yum_command'
I, [2014-03-30T18:55:44.005569 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/package/yum.rb:1049:in install_package'
I, [2014-03-30T18:55:44.005709 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/package.rb:60:in action_install'
I, [2014-03-30T18:55:44.005867 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource.rb:440:in send'
I, [2014-03-30T18:55:44.006006 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource.rb:440:in run_action'
I, [2014-03-30T18:55:44.006146 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:45:in run_action'
I, [2014-03-30T18:55:44.006304 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in converge'
I, [2014-03-30T18:55:44.006474 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in each'
I, [2014-03-30T18:55:44.006634 #4360] INFO -- sc-deploy: exec_cmd.rb::
run_cmd_log'::#Thread:0x7f4e493e7be8 192.168.10.177 /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `converge'
2
jdk.rb:
if node['java']['jvm'] == "IBM" then package "ibm-java-#{node[:java][:arch]}-sdk" do action :install end end
node[:java][:java_home] = "/opt/ibm/java-#{node[:java][:arch]}-#{node[:java][:version_name]}" node[:java][:java_path] = "#{node[:java][:java_home]}/jre" node[:java][:java_bin] = "#{node[:java][:java_home]}/bin"
template "jdk.sh" do path "/etc/profile.d/jdk.sh" source "jdk.sh.erb" owner "root" group "root" mode "755" end
3 我疑惑的是 chef 是去什么地方找安装介质来安装这个 jvm 的