Chef client 14.0.202 upgrade uninitialized constant Chef Provider LWRPBase InlineResources



We’ve tried to upgrade from Chef client from 12 to 14 but the run never starts with the following error :

Recipe Compile Error in C:/chef/cache/cookbooks/compat_resource/libraries/autoload.rb

**uninitialized constant Chef::Provider::LWRPBase::InlineResources**

We’ve not updated the other cookbooks in a long time

  - chef-client (6.0.0)
  - cron (1.7.6)
  - logrotate (2.1.0)
  - compat_resource (14.0.202)
  - windows (1.44.1)
  - chef_handler (1.4.0)
  - dotnetframework (1.2.0)
  - powershell (3.3.2)
  - ms_dotnet (3.0.0)
  - mq (0.2.0)

Whats is the best approach?

Do we upgrade to the latest off the site to all cookbooks above first then try newest Chef Client?

Have searched for “uninitialized constant Chef::Provider::LWRPBase::InlineResources” but nothing obvious that i understood.

many thanks



Well, the supermarket site of the compat_resource cookbook which causes your problems states “The compat_resource cookbook has been deprecated”. So most likely this cookbook simply is not compatible with chef 14, but it is also not required any more.



Congrats on the upgrade to Chef 14. I’m fairly certain that you can resolve this issue by updating the cookbooks listed in the output above. Give that a try and report back.



Do you have tests for your chef cookbooks so you know the impact of upgrading and whether anything breaks in your environment? Do you know whether you have dependencies on those cookbooks from other cookbooks? First step is assessing what cookbooks have problems in your current environment. Second is making a plan minimizing changes with each step. Once you assess your cookbooks, and then make your plan, and then complete the cookbook upgrades, I’d recommend upgrading to Chef 13 to see whether you have issues. You can use the chef_client_updater cookbook to update your chef client as well so that the 12->13, and 13->14 is easy to do.


Many thanks for all your responses

Just to let you know we updated all the community cookbooks from the supermarket to their latest versions and ensured they were used through dependencies / environment restrictions etc.

the Chef 14 client now runs and all completes - will do further testing but at the moment all good

def need to take the time to implement Berkshelf - the dependencies were a nightmare! :slight_smile: