Skip to content

Instantly share code, notes, and snippets.

@tas50
Created February 16, 2016 21:56
Show Gist options
  • Save tas50/35693a91b5057f2d4bba to your computer and use it in GitHub Desktop.
Save tas50/35693a91b5057f2d4bba to your computer and use it in GitHub Desktop.
compat failure
Installing chef
installing with rpm...
warning: /tmp/install.sh.3532/chef-12.7.2-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 83ef826a
Preparing... ########################################### [100%]
1:chef ########################################### [100%]
Thank you for installing Chef!
Transferring files to <instance-centos-511>
Starting Chef Client, version 12.7.2
Creating a new client identity for instance-centos-511 using the validator key.
resolving cookbooks for run list: ["test::instance"]
Synchronizing Cookbooks:
- test (1.0.0)
- memcached (2.0.3)
- runit (1.7.2)
- yum-epel (0.6.2)
- compat_resource (12.5.13)
- yum (3.8.2)
- packagecloud (0.1.0)
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/compat_resource/libraries/autoload.rb
================================================================================
LoadError
---------
cannot load such file -- chef_compat
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/compat_resource/libraries/autoload.rb:12:in `<top (required)>'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/compat_resource/libraries/autoload.rb:
5: begin
6: compat_resource_gem = Gem::Specification.find_by_name("compat_resource")
7: rescue Gem::LoadError
8: end
9:
10: if compat_resource_gem
11: # The gem is installed.
12>> require 'chef_compat'
13: # Make sure the version installed is more recent than the cookbook so there's no confusion.
14: version_rb = IO.read(File.expand_path("../../files/lib/chef_compat/version.rb", __FILE__))
15: raise "Version file not in correct format" unless version_rb =~ /VERSION\s*=\s*'([^']+)'/
16: version = $1
17: if Gem::Version.new(version) > Gem::Version.new(ChefCompat::VERSION)
18: raise "Installed compat_resource gem #{ChefCompat::VERSION} is *older* than the compat_resource cookbook. Please install a more recent version."
19: end
20: Chef::Log.info("Using compat_resource gem version #{ChefCompat::VERSION} installed on system instead of compat_resource cookbook (which is version #{version}).")
21: else
Running handlers:
[2016-02-16T21:46:48+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-02-16T21:46:48+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2016-02-16T21:46:48+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-02-16T21:46:48+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-02-16T21:46:48+00:00] ERROR: cannot load such file -- chef_compat
[2016-02-16T21:46:48+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <instance-centos-511>.
>>>>>> Please see .kitchen/logs/instance-centos-511.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '
sudo -E /opt/chef/bin/chef-client --local-mode --config /tmp/kitchen/client.rb --log_level warn --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json --chef-zero-port 8889
']
>>>>>> ----------------------
zlib(finalizer): the stream was freed prematurely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment