Closed nhariha1 closed 6 years ago
@nhariha1 Thanks for the report. This cookbook has not been made Chef 13 compatible yet.
@iennae Found the issue is with the Chef12 style 'Chef::Resources::AixTcpService' in the DSL-based custom providers. Modifying them to Chef13 supported 'Chef::Resource.resource_for_node(:aix_tcpservice, node)' fixed the problem.
If you could submit a PR that would be great! We don't have anything to test against right now to verify so having someone with that ability helps a lot!
If you can't, but would be willing to review a PR from me that would also be super helpful.
Found some more errors with other providers.. please allow me a week to fix all providers, and will send a PR.
Cookbook version
1.2.1
Chef-client version
13.0.118
Platform Details
aix "7100-04-04-1717"
Scenario:
Trying to run the cookbook with a simple recipe as below (issue happens on all different recipes) aix_tcpservice 'xntpd' do action :enable end
Steps to Reproduce:
run the above recipe (or infant any recipe)
Expected Result:
expecting the xntpd service to be enabled in /etc/rc.tcpip
Actual Result:
chef-stacktrace.txt
Starting Chef Client, version 13.0.118 resolving cookbooks for run list: ["aix"] Synchronizing Cookbooks:
aix_tcpservice[xntpd] action enable
================================================================================ Error executing action
enable
on resource 'aix_tcpservice[xntpd]'NameError
uninitialized constant Chef::Resource::AixTcpservice
Cookbook Trace:
/etc/chef/local-mode-cache/cache/cookbooks/aix/providers/tcpservice.rb:25:in `load_current_resource'
Resource Declaration:
In /etc/chef/local-mode-cache/cache/cookbooks/aix/recipes/default.rb
1: aix_tcpservice 'xntpd' do 2: action :enable 3: end
Compiled Resource:
Declared in /etc/chef/local-mode-cache/cache/cookbooks/aix/recipes/default.rb:1:in `from_file'
aix_tcpservice("xntpd") do action [:enable] default_guard_interpreter :default declared_type :aix_tcpservice cookbook_name "aix" recipe_name "default" identifier "xntpd" end
System Info:
chef_version=13.0.118 platform=aix platform_version=7.1 ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [powerpc-aix6.1.0.0] program_name=chef-client worker: ppid=11272326;start=02:33:10; executable=/opt/chef/bin/chef-client
Running handlers: [2017-05-09T02:33:18-04:00] ERROR: Running exception handlers [2017-05-09T02:33:18-04:00] ERROR: Running exception handlers Running handlers complete [2017-05-09T02:33:18-04:00] ERROR: Exception handlers complete [2017-05-09T02:33:18-04:00] ERROR: Exception handlers complete Chef Client failed. 0 resources updated in 08 seconds [2017-05-09T02:33:18-04:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out [2017-05-09T02:33:18-04:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out [2017-05-09T02:33:18-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2017-05-09T02:33:18-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2017-05-09T02:33:18-04:00] ERROR: aix_tcpservice[xntpd] (aix::default line 1) had an error: NameError: uninitialized constant Chef::Resource::AixTcpservice [2017-05-09T02:33:18-04:00] ERROR: aix_tcpservice[xntpd] (aix::default line 1) had an error: NameError: uninitialized constant Chef::Resource::AixTcpservice [2017-05-09T02:33:18-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) [2017-05-09T02:33:18-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)