Vagrant 配置失败:未找到 Cookbook vagrant
Vagrant provisioning fails: Cookbook vagrant not found
执行vagrant reload --provision
时在执行chef_solo
时失败。 OSX 上的多台机器 运行 上的两个不同的盒子突然发生了这种情况。
Google 没有显示任何内容,似乎没有安装 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>'
原来这是 Vagrant 1.7.2 的一个错误,降级到 1.6.5 似乎可以解决所有受影响机器上的问题。
执行vagrant reload --provision
时在执行chef_solo
时失败。 OSX 上的多台机器 运行 上的两个不同的盒子突然发生了这种情况。
Google 没有显示任何内容,似乎没有安装 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>'
原来这是 Vagrant 1.7.2 的一个错误,降级到 1.6.5 似乎可以解决所有受影响机器上的问题。