簡體   English   中英

使用Chef 13.6.4運行Chef-solo時出錯

[英]Error running chef-solo with Chef 13.6.4

我有一本關於Chef 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一起成功使用):

[root@utah testdir]# cat solo.rb
cookbook_path '/root/chef/cookbooks'
role_path '/root/chef/cookbooks/testcookbook/roles'
data_bag_path '/root/chef/cookbooks/testcookbook/data_bags'
encrypted_data_bag_secret 
'/root/chef/cookbooks/testcookbook/data_bags/data_bag_key'

檢查install_db.json文件,您將在運行列表中錯誤地分配了配方名稱。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM