【问题标题】:cannot run my cookbook on chef workstation无法在厨师工作站上运行我的食谱
【发布时间】:2020-04-08 12:06:15
【问题描述】:

运行时 chef-client --local-mode --override-runlist first_cookbook 我收到以下错误

[2020-04-07T16:31:06+05:30] WARN: No config file found or specified on command line. Using command line options instead.
[2020-04-07T16:31:06+05:30] WARN: No cookbooks directory found at or above current directory.  Assuming C:/Windows/System32.
Starting Chef Infra Client, version 15.8.23

[2020-04-07T16:31:24+05:30] WARN: Run List override has been provided.
[2020-04-07T16:31:24+05:30] WARN: Original Run List: []
[2020-04-07T16:31:24+05:30] WARN: Overridden Run List: [recipe[first_cookbook]]
resolving cookbooks for run list: ["first_cookbook"]

================================================================================
Error Resolving Cookbooks for Run List:
================================================================================

Missing Cookbooks:
------------------
No such cookbook: first_cookbook

Expanded Run List:
------------------
* first_cookbook

System Info:
------------
chef_version=15.8.23
platform=windows
platform_version=10.0.18363
ruby=ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
program_name=C:/opscode/chef-workstation/modules/chef/../../bin/chef-client
executable=C:/opscode/chef-workstation/bin/chef-client


Running handlers:

[2020-04-07T16:31:24+05:30] ERROR: Running exception handlers
Running handlers complete
[2020-04-07T16:31:24+05:30] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 18 seconds
[2020-04-07T16:31:24+05:30] FATAL: Stacktrace dumped to C:/Users/sneha/.chef/local-mode-cache/cache/chef-stacktrace.out
[2020-04-07T16:31:24+05:30] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report

[2020-04-07T16:31:24+05:30] FATAL: Net::HTTPServerException: 412 "Precondition Failed"

我的食谱路径是C:\Windows\System32\first_cookbook 有人可以帮我解决这个问题吗?我是厨师新手,工作 Windows 操作系统对我来说也是新环境

【问题讨论】:

  • 你有C:\Windows\System32\first_cookbook\metadata.rb 将食谱的名称写为“first_cookbook”吗?
  • Draco 谢谢你的时间我已经解决了这个问题

标签: chef-infra cookbook chef-workstation


【解决方案1】:

经过大量分析,我知道这是一个非常小的问题,我们的食谱(在我的例子中是 first_cookbook)应该位于名为 cookbooks 的文件夹中

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-21
    相关资源
    最近更新 更多