在vagrant up --provision
期间,它会因错误而停止:
...
==> default: [2016-05-23T08:05:57+00:00] INFO: *** Chef 12.11.1 ***
==> default: [2016-05-23T08:05:57+00:00] INFO: Platform: x86_64-linux
==> default: [2016-05-23T08:05:57+00:00] INFO: Chef-client pid: 1725
==> default: [2016-05-23T08:06:04+00:00] INFO: GET /organizations/chef/nodes/vagrant-0393a049
==> default: [2016-05-23T08:06:04+00:00] INFO: #<ChefZero::RestErrorResponse: 404: Object not found: chefzero://localhost:8889/nodes/vagrant-0393a049>
....
==> default: [2016-05-23T08:06:04+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/vagrant-0393a049
==> default: [2016-05-23T08:06:04+00:00] INFO: POST /organizations/chef/nodes
==> default: --- POST BODY ---
==> default: {"name":"vagrant-0393a049","chef_environment":"_default","json_class":"Chef::Node","automatic":{},"normal":{},"chef_type":"node","default":{},"override":{},"run_list":[]}
==> default: --- END POST BODY ---
...
问题是 - 我根本没有chefzero
:
$ grep -r "chefzero" . | wc -l
0
也许 - 这是依赖的某个地方,但我找不到。
此外 - Vagrantfile
之前使用了此Vagrantfile
,而 config.berkshelf.enabled = true
config.vm.provision "chef_solo" do |chef|
chef.add_recipe "apt"
chef.add_recipe "nginx::repo"
chef.add_recipe "nginx"
chef.add_recipe "php5-fpm::install"
chef.add_recipe "future::mysql"
chef.add_recipe "future::nginx"
chef.add_recipe "future::php"
chef.add_recipe "future"
chef.add_recipe "future::vm"
chef.add_recipe "python"
chef.add_recipe "future::boto3"
...
中没有任何更改:
vagrant20160523-25017-1fg91dt2.lock
另外 - 我在Vagrantfile
目录中看到了一堆像d20160523-21769-1yiatxb
这样的文件,以及window.activateTab = function(tab) {
$('.nav-tabs a[href="#' + tab + '"]').tab('show');
}
这样的目录。它们每次在VM启动后出现。
任何提示赞赏。
答案 0 :(得分:0)
最近的厨师版
几天内报道的问题很少解决方案是降级厨师版本。在您的Vagrantfile中,只需提及要使用的厨师版本,例如
Vagrant.configure("2") do |config|
config.vm.provision "chef_solo" do |chef|
chef.version = "12.10.24"
chef.add_recipe ....
end
end