我正在使用厨师在vcenter中创建一个基本的vm。它能够创建vm uisng厨师配置驱动程序,但厨师 - 客户正在抛出错误。
`在root @ ipadddress上执行chef-client -l信息
if @vendor == "0" #checks for vendor
@purchase_requests = PurchaseRequest.includes(:purchase_order)
.where(:created_at => @date_start..@date_end)
.where(:total_cost => @cost_beginning..@cost_end)
else
@purchase_requests = PurchaseRequest.includes(:purchase_order)
.where(:created_at => @date_start..@date_end)
.where(:total_cost => @cost_beginning..@cost_end)
.where("purchaseorder.VendorRef_ListID = ?", @vendor)
end
[2015-08-04T10:22:03-05:00]信息:已完成关于root @ ipaddress的chef-client -l信息:退出状态1
[Centos] [2015-08-04T11:21:54-04:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 12.4.1[0m
[2015-08-04T11:21:54-04:00] INFO: *** Chef 12.4.1 ***
[2015-08-04T11:21:54-04:00] INFO: Chef-client pid: 9394
[2015-08-04T11:21:57-04:00] INFO: Run List is [recipe[vmware::machines]]
[2015-08-04T11:21:57-04:00] INFO: Run List expands to [vmware::machines]
[2015-08-04T11:21:57-04:00] INFO: Starting Chef Run for Centos
[2015-08-04T11:21:57-04:00] INFO: Running start handlers
[2015-08-04T11:21:57-04:00] INFO: Start handlers complete.
[2015-08-04T11:21:57-04:00] INFO: HTTP Request Returned 404 Not Found : Object not found: /reports/nodes/Centos/runs
resolving cookbooks for run list: ["vmware::machines"][0m
[2015-08-04T11:22:02-04:00] INFO: Loading cookbooks [vmware@1.28.0, xyz-base-cookbook@0.0.2, chef-sugar@2.5.0]
Synchronizing Cookbooks:[0m
- vmware[0m
- xyz-base-cookbook[0m
- chef-sugar[0m
Compiling Cookbooks...[0m
[0m
================================================================================[0m
[31mRecipe Compile Error[0m
================================================================================[0m
[0mChef::Exceptions::RecipeNotFound[0m
--------------------------------[0m
could not find recipe machines for cookbook vmware[0m
[0m[0m
Running handlers:[0m
[2015-08-04T11:22:03-04:00] ERROR: Running exception handlers
Running handlers complete
[0m[2015-08-04T11:22:03-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 8.948866571 seconds[0m
[2015-08-04T11:22:03-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2015-08-04T11:22:03-04:00] ERROR: could not find recipe machines for cookbook vmware
[2015-08-04T11:22:03-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2015-08-04T10:22:03-05:00]信息:在重新引发异常之前运行排队的延迟通知 `
答案 0 :(得分:1)
啊,错误实际上是找不到你的食谱,机器。公共版本包含默认值和工具配方。如果您有一个修改过的本地副本,则需要确保将其上传到您的厨师服务器,以便厨师 - 客户不会以同一名称查看公共超市的食谱。
或者更好地将您的组织名称添加到食谱中,以便更清楚地区分,例如
<yourorgname>_vmware
作为旁注,-l info将仅显示信息级记录器输出。你可能想要只做chef-client或-l debug,这取决于你想要向你吐出多少信息。