流动供应失败:没有找到食谱流浪汉

时间:2015-03-04 10:24:19

标签: vagrant chef

执行vagrant reload --provision时,执行chef_solo时失败。这种情况突然发生在OSX上运行的多台机器上有两个不同的盒子。 谷歌没有显示任何内容,似乎没有安装vagrant-berkshelf插件。

配置时在控制台中输出:

==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: [2015-03-04T08:28:55+00:00] INFO: Forking chef instance to converge...
==> default: [2015-03-04T08:28:55+00:00] INFO: *** Chef 11.6.0 ***
==> default: [2015-03-04T08:28:58+00:00] INFO: Setting the run_list to ["recipe[vagrant]"] from JSON
==> default: [2015-03-04T08:28:58+00:00] INFO: Run List is [recipe[vagrant]]
==> default: [2015-03-04T08:28:58+00:00] INFO: Run List expands to [vagrant]
==> default: [2015-03-04T08:28:58+00:00] INFO: Starting Chef Run for example.lo
==> default: [2015-03-04T08:28:58+00:00] INFO: Running start handlers
==> default: [2015-03-04T08:28:58+00:00] INFO: Start handlers complete.
==> default: [2015-03-04T08:28:58+00:00] ERROR: Running exception handlers
==> default: [2015-03-04T08:28:58+00:00] ERROR: Exception handlers complete
==> default: [2015-03-04T08:28:58+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-03-04T08:28:58+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

框内/var/chef/cache/chef-stacktrace.out的内容:

Generated at 2015-03-04 08:28:58 +0000
Chef::Exceptions::CookbookNotFound: Cookbook vagrant not found. If you're loading vagrant from another cookbook, make sure you configure the dependency in your metadata
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-6.18.0/lib/ohai/mash.rb:77:in `yield'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-6.18.0/lib/ohai/mash.rb:77:in `default'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-6.18.0/lib/ohai/mash.rb:77:in `default'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:265:in `[]'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:265:in `each_cookbook_dep'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:243:in `add_cookbook_with_deps'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:87:in `block in cookbook_order'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:85:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:85:in `cookbook_order'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:97:in `compile_libraries'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context/cookbook_compiler.rb:70:in `compile'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/run_context.rb:86:in `load'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:249:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:492:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:199:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/solo.rb:239:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/solo.rb:231:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/solo.rb:231:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `<main>'

1 个答案:

答案 0 :(得分:1)

原来这是Vagrant 1.7.2的一个错误,降级到1.6.5似乎解决了所有受影响的机器上的问题。