You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to validate a minimal use-case converge in test-kitchen via wrapper cookbook
Steps to Reproduce:
Initialize blank cookbook
Add default['chef-server']['accept_license'] = true to attributes/default.rb
Add include_recipe 'chef-server' to recipes/default.rb
Add depends 'chef-server' to metadata.rb
Add run_list: my-wrapper-cookbook to kitchen.yml
Run kitchen converge
Expected Result:
Expecting vagrant VM with chef-server package installed
Actual Result:
Chef converge fails with
* chef_ingredient[chef-server] action reconfigure
* ingredient_config[chef-server] action render
* directory[/etc/opscode] action create (up to date)
* file[/etc/opscode/chef-server.rb] action create (up to date)
(up to date)
* execute[chef-server-core-reconfigure] action run
================================================================================
Error executing action `run` on resource 'execute[chef-server-core-reconfigure]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '172'
---- Begin output of chef-server-ctl reconfigure ----
STDOUT: Chef Infra Server cannot execute without accepting the license
STDERR:
---- End output of chef-server-ctl reconfigure ----
Ran chef-server-ctl reconfigure returned 172
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/chef-ingredient/resources/chef_ingredient.rb
106: execute "#{ingredient_package_name}-reconfigure" do
107: command "#{ingredient_ctl_command} reconfigure"
108: end
109: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/chef-ingredient/resources/chef_ingredient.rb:106:in `block in class_from_file'
execute("chef-server-core-reconfigure") do
action [:run]
default_guard_interpreter :execute
command "chef-server-ctl reconfigure"
backup 5
declared_type :execute
cookbook_name "chef-server"
domain nil
user nil
end
System Info:
------------
chef_version=14.14.29
platform=ubuntu
platform_version=18.04
ruby=ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux]
program_name=/opt/chef/bin/chef-client
executable=/opt/chef/bin/chef-client
================================================================================
Error executing action `reconfigure` on resource 'chef_ingredient[chef-server]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[chef-server-core-reconfigure] (/tmp/kitchen/cache/cookbooks/chef-ingredient/resources/chef_ingredient.rb line 106) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '172'
---- Begin output of chef-server-ctl reconfigure ----
STDOUT: Chef Infra Server cannot execute without accepting the license
STDERR:
---- End output of chef-server-ctl reconfigure ----
Ran chef-server-ctl reconfigure returned 172
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/chef-server/recipes/default.rb
29: chef_ingredient 'chef-server' do
30: extend ChefServerCookbook::Helpers
31: version node['chef-server']['version'] unless node['chef-server']['version'].nil?
32: package_source node['chef-server']['package_source']
33: config <<-EOS
34: topology "#{node['chef-server']['topology']}"
35: #{"api_fqdn \"#{node['chef-server']['api_fqdn']}\"" if api_fqdn_available?}
36: #{node['chef-server']['configuration']}
37: EOS
38: action :install
39: end
40:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/chef-server/recipes/default.rb:29:in `from_file'
chef_ingredient("chef-server") do
action [:install]
updated true
default_guard_interpreter :default
declared_type :chef_ingredient
cookbook_name "chef-server"
recipe_name "default"
package_source nil
config "topology \"standalone\"\napi_fqdn \"default-ubuntu-1804.vagrantup.com\"\n\n"
product_name "chef-server"
platform "ubuntu"
platform_version "18.04"
architecture "x86_64"
end
System Info:
------------
chef_version=14.14.29
platform=ubuntu
platform_version=18.04
ruby=ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux]
program_name=/opt/chef/bin/chef-client
executable=/opt/chef/bin/chef-client
Running handlers:
[2019-12-09T20:43:29+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-12-09T20:43:29+00:00] ERROR: Exception handlers complete
Chef Client failed. 7 resources updated in 01 minutes 08 seconds
[2019-12-09T20:43:29+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2019-12-09T20:43:29+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-12-09T20:43:29+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: chef_ingredient[chef-server] (chef-server::default line 29) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[chef-server-core-reconfigure] (/tmp/kitchen/cache/cookbooks/chef-ingredient/resources/chef_ingredient.rb line 106) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '172'
---- Begin output of chef-server-ctl reconfigure ----
STDOUT: Chef Infra Server cannot execute without accepting the license
STDERR:
---- End output of chef-server-ctl reconfigure ----
Ran chef-server-ctl reconfigure returned 172
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <default-ubuntu-1804>. Please see .kitchen/logs/default-ubuntu-1804.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
The text was updated successfully, but these errors were encountered:
The following must be fixed first:
Honors accept_license for the Chef Infra Server install #159 (#159)
Honoring Chef Infra Server license accept #241 (chef-cookbooks/chef-ingredient#241)
Cookbook version
5.5.2
Chef-client version
14.14.29
Platform Details
ubuntu-18.04
Scenario:
Attempting to validate a minimal use-case converge in test-kitchen via wrapper cookbook
Steps to Reproduce:
default['chef-server']['accept_license'] = true
toattributes/default.rb
include_recipe 'chef-server'
torecipes/default.rb
depends 'chef-server'
tometadata.rb
run_list: my-wrapper-cookbook
to kitchen.ymlkitchen converge
Expected Result:
Expecting vagrant VM with chef-server package installed
Actual Result:
Chef converge fails with
The text was updated successfully, but these errors were encountered: