Ошибка запуска chef-solo с Chef 13.6.4 - PullRequest
0 голосов
/ 07 мая 2018

У меня есть поваренная книга, работающая на шеф-повара 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'

1 Ответ

0 голосов
/ 28 августа 2018

проверьте файл install_db.json, вы бы неправильно присвоили имя рецепта в runlist.

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