Repository: test-kitchen/test-kitchen

Issue #923: chef_omnibus_root is nil on images pre-baked with a chef client
Created: 2016-01-24T02:44:40Z
On test-kitchen 1.5.0, the chef_client_path is set to /bin/chef-client if the chef_zero provisioner doesn't have to perform an omnibus install.
Here's my kitchen diagnose : https://gist.github.com/aespinosa/00d81f95d1a9e060c51d

Duplicate issue #968: test-kitchen 1.5 has different chef_client_path
Created: 2016-03-11T14:18:34Z
Description
This issues causes a converge to fail on a RHEL6 EC2 instance.
Running version 1.4.2 of test-kitchen, kitchen diagnose said chef_client_path was:
/opt/chef/bin/chef-client

I've just installed chefdk 0.11.2, which uses 1.5.0 of test-kitchen, and now chef_client_path is:
/bin/chef-client

I can add this to my .kitchen/config.yml to workaround the problem:
provisioner:
  name: chef_zero
  chef_client_path: '/opt/bin/chef-chef-client'

Kitchen Version
Test Kitchen version 1.5.0
ChefDK Version
Chef Development Kit Version: 0.11.2
chef-client version: 12.7.2
berks version: 4.2.0
kitchen version: 1.5.0

Platform Version
Mac OSX

Replication Case
Converge now fails as it can't find the chef-client:
kitchen converge default-aws-nonprod-rhel6
-----> Starting Kitchen (v1.5.0)
-----> Converging <default-aws-nonprod-rhel6>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 4.2.1...
       Removing non-cookbook files before transfer
       Preparing data_bags
       Preparing environments
       Preparing roles
       Preparing validation.pem
       Preparing client.rb
       Transferring files to <default-aws-nonprod-rhel6>
       sudo: /bin/chef-client: command not found
>>>>>> Converge failed on instance <default-aws-nonprod-rhel6>.
>>>>>> Please see .kitchen/logs/default-aws-nonprod-rhel6.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '
[ Proxy info cut from here ]
sudo -E /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.

Kitchen Log
I, [2016-03-11T14:03:46.296578 #8300]  INFO -- default-aws-nonprod-rhel6: -----> Converging <default-aws-nonprod-rhel6>...
I, [2016-03-11T14:03:46.297076 #8300]  INFO -- default-aws-nonprod-rhel6: Preparing files for transfer
I, [2016-03-11T14:03:46.297147 #8300]  INFO -- default-aws-nonprod-rhel6: Preparing dna.json
I, [2016-03-11T14:03:46.297870 #8300]  INFO -- default-aws-nonprod-rhel6: Resolving cookbook dependencies with Berkshelf 4.2.1...
I, [2016-03-11T14:03:46.467809 #8300]  INFO -- default-aws-nonprod-rhel6: Removing non-cookbook files before transfer
I, [2016-03-11T14:03:46.472606 #8300]  INFO -- default-aws-nonprod-rhel6: Preparing data_bags
I, [2016-03-11T14:03:46.472801 #8300]  INFO -- default-aws-nonprod-rhel6: Preparing environments
I, [2016-03-11T14:03:46.474563 #8300]  INFO -- default-aws-nonprod-rhel6: Preparing roles
I, [2016-03-11T14:03:46.474808 #8300]  INFO -- default-aws-nonprod-rhel6: Preparing validation.pem
I, [2016-03-11T14:03:46.475320 #8300]  INFO -- default-aws-nonprod-rhel6: Preparing client.rb
I, [2016-03-11T14:03:46.900510 #8300]  INFO -- default-aws-nonprod-rhel6: Transferring files to <default-aws-nonprod-rhel6>
I, [2016-03-11T14:03:50.805318 #8300]  INFO -- default-aws-nonprod-rhel6: sudo: /bin/chef-client: command not found
E, [2016-03-11T14:03:50.811432 #8300] ERROR -- default-aws-nonprod-rhel6: Converge failed on instance <default-aws-nonprod-rhel6>.
E, [2016-03-11T14:03:50.811538 #8300] ERROR -- default-aws-nonprod-rhel6: ------Exception-------
E, [2016-03-11T14:03:50.811565 #8300] ERROR -- default-aws-nonprod-rhel6: Class: Kitchen::ActionFailed

Closing comment (2016-03-11T16:26:42Z): Ah, looks like this is a dupe of #923