chef-cookbooks / aix

Resources for AIX hosts
https://supermarket.chef.io/cookbooks/aix
Apache License 2.0
23 stars 42 forks source link

"uninitialized constant" error with chef-client 13.X run #70

Closed nhariha1 closed 6 years ago

nhariha1 commented 7 years ago

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:

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)

iennae commented 7 years ago

@nhariha1 Thanks for the report. This cookbook has not been made Chef 13 compatible yet.

nhariha1 commented 7 years ago

@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.

iennae commented 7 years ago

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.

nhariha1 commented 7 years ago

Found some more errors with other providers.. please allow me a week to fix all providers, and will send a PR.