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
I'm attempting to update the chef-compliance cookbook for sous-chefs and currently the pinning is very old. Due to a new issue raised, I'd like to update the chef-ingredient requirement to the latest since fqdn_resolves? has returned. Upon working and testing the cookbook with only a version change, I'm getting messages about chef_backend resources ... there's nothing in compliance that is identifying this some this has to be something that ingredient is doing. I'm also getting really different behavior depending on the platform
Steps to Reproduce:
Example basic recipe:
chef_ingredient 'compliance' do
accept_license true
config <<-EOC
topology "standalone"
compliance_fqdn "compliance.localhost.local
EOC
action :install
end
ingredient_config 'compliance' do
notifies :reconfigure, 'chef_ingredient[compliance]', :immediately
end
Running this with test-kitchen and dokken results in different behaviors based on the above platforms mentioned.
Expected Result:
Chef compliance is correctly configured
Actual Result:
centos-7 / client 12.x:
Deprecated features used!
Default value nil is invalid for property publish_address of resource chef_backend. Possible fixes: 1. Remove 'default: nil' if nil means 'undefined'. 2. Set a valid default value if there is a reasonable one. 3. Allow nil as a valid value of your property (for example, 'property :publish_address, [ String, nil ], default: nil'). Error: Property publish_address must be one of: String! You passed nil. at 1 location:
- /opt/kitchen/cache/cookbooks/chef-ingredient/resources/backend.rb:30:in `class_from_file'
See https://docs.chef.io/deprecations_custom_resource_cleanups.html for further details.
Chef Client finished, 7/16 resources updated in 03 minutes 33 seconds
Finished converging <default-centos-7> (3m35.15s).
-----> Kitchen is finished. (3m36.99s)
Ubuntu-14.04 / Ubuntu 16-04 / client 12.x:
[2017-10-30T22:58:27+00:00] INFO: Running queued delayed notifications before re-raising exception
[2017-10-30T22:58:27+00:00] ERROR: Running exception handlers
[2017-10-30T22:58:27+00:00] ERROR: Exception handlers complete
[2017-10-30T22:58:27+00:00] FATAL: Stacktrace dumped to /opt/chef-compliance/embedded/cookbooks/cache/chef-stacktrace.out
[2017-10-30T22:58:27+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-10-30T22:58:27+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: component_runit_supervisor[chef-compliance] (enterprise::runit line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[initctl status chef-compliance-runsvdir] (/opt/chef-compliance/embedded/cookbooks/cache/cookbooks/enterprise/resources/component_runit_supervisor_upstart.rb line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of initctl status chef-compliance-runsvdir ----
STDOUT:
STDERR: initctl: Unknown job: chef-compliance-runsvdir
---- End output of initctl status chef-compliance-runsvdir ----
Ran initctl status chef-compliance-runsvdir returned 1
STDERR:
---- End output of chef-compliance-ctl reconfigure ----
Ran chef-compliance-ctl reconfigure returned 1
[2017-10-30T22:58:27+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
centos-7 / client 13.5.3:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /opt/kitchen/cache/cookbooks/chef-ingredient/resources/backend.rb
================================================================================
Chef::Exceptions::ValidationFailed
----------------------------------
Property publish_address must be one of: String! You passed nil.
Cookbook Trace:
---------------
/opt/kitchen/cache/cookbooks/chef-ingredient/resources/backend.rb:30:in `class_from_file'
Relevant File Content:
----------------------
/opt/kitchen/cache/cookbooks/chef-ingredient/resources/backend.rb:
23:
24: property :name, String, name_property: true
25: property :channel, Symbol, default: :stable
26: property :version, [String, Symbol], default: :latest
27: property :config, String, default: ''
28: property :accept_license, [TrueClass, FalseClass], default: false
29: property :peers, [String, Array], required: true
30>> property :publish_address, String, default: node['ipaddress']
31: property :chef_backend_secrets, String, default: ''
32: property :platform, String
33: property :platform_version, String
34:
35: alias :bootstrap_node :peers
36:
37: load_current_value do
38: # node.run_state['chef-users'] ||= Mixlib::ShellOut.new('chef-server-ctl user-list').run_command.stdout
39: # current_value_does_not_exist! unless node.run_state['chef-users'].index(/^#{username}$/)
System Info:
------------
chef_version=13.5.3
platform=centos
platform_version=7.4.1708
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
program_name=chef-client worker: ppid=73;start=23:00:55;
executable=/opt/chef/embedded/bin/chef-client
Running handlers:
[2017-10-30T23:00:57+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-10-30T23:00:57+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 02 seconds
[2017-10-30T23:00:57+00:00] FATAL: Stacktrace dumped to /opt/kitchen/cache/chef-stacktrace.out
[2017-10-30T23:00:57+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-10-30T23:00:57+00:00] ERROR: Property publish_address must be one of: String! You passed nil.
[2017-10-30T23:00:57+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Ubuntu-14.04 / Ubuntu 16-04 / client 13.5.3:
Running handlers:
Running handlers complete
Chef Client finished, 9/16 resources updated in 01 minutes 42 seconds
Finished converging <default-ubuntu-trusty> (1m44.54s).
-----> Kitchen is finished. (1m48.69s)
Ubuntu-
The text was updated successfully, but these errors were encountered:
Cookbook version
2.1.10
Chef-client version
12.21.26 - latest (13.5.x
Platform Details
Scenario:
I'm attempting to update the chef-compliance cookbook for sous-chefs and currently the pinning is very old. Due to a new issue raised, I'd like to update the chef-ingredient requirement to the latest since
fqdn_resolves?
has returned. Upon working and testing the cookbook with only a version change, I'm getting messages about chef_backend resources ... there's nothing in compliance that is identifying this some this has to be something that ingredient is doing. I'm also getting really different behavior depending on the platformSteps to Reproduce:
Example basic recipe:
Running this with test-kitchen and dokken results in different behaviors based on the above platforms mentioned.
Expected Result:
Chef compliance is correctly configured
Actual Result:
centos-7 / client 12.x:
Ubuntu-14.04 / Ubuntu 16-04 / client 12.x:
centos-7 / client 13.5.3:
Ubuntu-14.04 / Ubuntu 16-04 / client 13.5.3:
Ubuntu-
The text was updated successfully, but these errors were encountered: