Chef infra 使用chef 13.6.4运行chef solo时出错

Chef infra 使用chef 13.6.4运行chef solo时出错,chef-infra,chef-solo,Chef Infra,Chef Solo,我有一本关于厨师12.6的食谱。在使用Chef 13.6.4测试代码时,我得到以下错误: [root@utah testcookbook ]# chef-solo -c solo.rb -j install_db.json Starting Chef Client, version 13.6.4 ================================================================================ Error expanding the

我有一本关于厨师12.6的食谱。在使用Chef 13.6.4测试代码时,我得到以下错误:

[root@utah testcookbook ]# chef-solo -c solo.rb -j install_db.json
Starting Chef Client, version 13.6.4

================================================================================
Error expanding the run_list:
================================================================================

Unexpected Error:
-----------------
Chef::Exceptions::ValidationFailed: Option name's value  does not match regular expression /^[\-[:alnum:]_]+$/

System Info:
------------
chef_version=13.6.4
platform=oracle
platform_version=7.3
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
program_name=chef-solo worker: ppid=4738;start=12:59:27;
executable=/opt/chef/bin/chef-solo


Running handlers:
[2018-05-07T12:59:31-07:00] ERROR: Running exception handlers
[2018-05-07T12:59:31-07:00] ERROR: Running exception handlers
Running handlers complete
[2018-05-07T12:59:31-07:00] ERROR: Exception handlers complete
[2018-05-07T12:59:31-07:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 04 seconds
[2018-05-07T12:59:31-07:00] FATAL: Stacktrace dumped to /root/chef/cookbooks/testcookbook/local-mode-cache/cache/chef-stacktrace.out
[2018-05-07T12:59:31-07:00] FATAL: Stacktrace dumped to /root/chef/cookbooks/testcookbook/local-mode-cache/cache/chef-stacktrace.out
[2018-05-07T12:59:31-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-05-07T12:59:31-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-05-07T12:59:31-07:00] ERROR: Option name's value  does not match regular expression /^[\-[:alnum:]_]+$/
[2018-05-07T12:59:31-07:00] ERROR: Option name's value  does not match regular expression /^[\-[:alnum:]_]+$/
[2018-05-07T12:59:31-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2018-05-07T12:59:31-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
以下是我的solo.rb文件的内容(与Chef 12.6成功合作):


检查install_db.json文件,您可能在运行列表中错误地分配了配方名称

{
 "hostname": {
 "run_list": [ "recipe[recipe_name]" ]
}

检查堆栈跟踪,我会认为您的资源格式不正确。
{
 "hostname": {
 "run_list": [ "recipe[recipe_name]" ]
}