chef/omnitruck

Kitchen Converge Fails for CentOS & Ubuntu

Closed this issue · 7 comments

Attempting to work through one of the new learning courses, and I've run into an issue with the kitchen converge command. It fails for both the CentOS & Ubuntu servers.

Describe the problem

Following the provided course instructions when I attempt to execute the kitchen converge command, it fails with the following errors:

Software Version

Chef Workstation version: 20.6.62
Chef Infra Client version: 16.1.16
Chef InSpec version: 4.19.0
Chef CLI version: 3.0.4
Test Kitchen version: 2.5.1
Cookstyle version: 6.7.3
VirtualBox: 6.1.10r138449
Vagrant: 2.2.9

Replication Case

Follow the steps provided in the course.

Possible Solution

My guess is there's some kind of bug in the 16.1.16 version of the Chef client, but I don't know where to pin the version in my Chef code to test that hypothesis.

A few other things I've tried:

  • Found how to set require_chef_omnibus attribute; tested versions 16.1.0 and 15.11.8 and both fail in the same way as the current stable version
  • Downgraded the OS platforms from Ubuntu 20.04 to Ubuntu 18.04 and CentOS 8 to CentOS 7; both still fail with the same errors
  • Cleared my .kitchen/cache/ folder to force a fresh download; no change

I'm running into the same issue when attempting to converge the sous-chef/tomcat cookbook on centos-7 with Chef 14.15.6.

I've verified that the sha256sum of the file that gets download matches the metadata json that is published, so I'm not sure what's causing the mismatch.

       Resolving cookbook dependencies with Berkshelf 7.0.8...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
       el 7 x86_64
       downloading https://omnitruck.chef.io/stable/chef/metadata?v=14.15.6&p=el&pv=7&m=x86_64
         to file /tmp/install.sh.7273/metadata.txt
       trying wget...
       sha1     0f10d3ee5e2becfb2eb28af8ace5b12c4a535fa3
       sha256   10fac8b4f3382dd990d0474fcf8acbaef9fd935f9f6aec1a83f0ec5f124a3cad
       url      https://packages.chef.io/files/stable/chef/14.15.6/el/7/chef-14.15.6-1.el7.x86_64.rpm
       version  14.15.6
       downloaded metadata file looks valid...
       Comparing checksum with sha256sum...
       Package checksum mismatch!
       Version: 14.15.6

       Please file a Bug Report at https://github.com/chef/omnitruck/issues/new
       Alternatively, feel free to open a Support Ticket at https://www.chef.io/support/tickets
       More Chef support resources can be found at https://www.chef.io/support

       the problem (if possible), type of the Operating System and its version, etc.,
       and any other relevant details that might help us with troubleshooting.

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <templated-service-centos-7>.  Please see .kitchen/logs/templated-service-centos-7.log for more details

So interestingly for myself, I had an explicit cache_directory: "C:\\omnibus\\cache" since I typically am using Windows boxes.

I threw a cache_directory: false at the driver level in the repo kitchen.local.yml I had configured, and now the check mismatch did not occur.

I'll have to do some more testing to see if having any cache directory defined is what is causing the problem or possibly just that mine was a bit odd (it did create a folder named C:\omnibus\cache that the rpm was downloaded to).

Had the same error while try the learn chef course from learn.chef.io

OS version

windows10 2004
OS build 19041.329

software version

Chef Workstation version: 20.7.81
Chef Infra Client version: 16.2.73
Chef InSpec version: 4.21.1
Chef CLI version: 3.0.11
Test Kitchen version: 2.5.2
Cookstyle version: 6.9.0
VirtualBox: 6.1.10r138449
Vagrant: 2.2.9

platforms

bento/ubuntu-20.04
bento/centos-8
bento/ubuntu-18.04
bento/centos-8
bionic64/ubuntu-18.04

Had the same error while try the learn chef course from learn.chef.io

OS version

windows10 2004
OS build 19041.329

software version

Chef Workstation version: 20.7.81
Chef Infra Client version: 16.2.73
Chef InSpec version: 4.21.1
Chef CLI version: 3.0.11
Test Kitchen version: 2.5.2
Cookstyle version: 6.9.0
VirtualBox: 6.1.10r138449
Vagrant: 2.2.9

platforms

bento/ubuntu-20.04
bento/centos-8
bento/ubuntu-18.04
bento/centos-8
bionic64/ubuntu-18.04

finally, tried with:
box: centos/7
Get no error with kitchen converge

Tried again from Ubuntu 20.04 machine with Chef Workstation version 20.7.81, and it things are working fine. Closing.

Apparently, this is something that I feel is caused by poor internet or an interrupt from user which makes chef, miss few packets while converging and then saves other locally in a cache, which further throws package checksum mismatch issue while converging again.

Deleting contents of "cache folder" files from ".knife" folder worked for me..