You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running kitchen converge for a Windows guest, no error is returned if chef-client.bat is not found in the guest. Instead, converge exits successfully without running chef.
This was discovered when using CINC workstation locally against templates that were built with Chef Client instead of CINC Client.
Version
> chef --version
Redirecting to cinc
Cinc Workstation version: 22.4.861
Biome version: unknown
Test Kitchen version: 3.2.2
Cookstyle version: 7.32.1
Cinc Client version: 17.10.0
Cinc Auditor version: 4.56.19
Cinc CLI version: 5.6.1
Environment
Windows 10 with CINC Workstation 22.4.861.
Steps to Reproduce
Install CINC workstation
Create a new Windows cookbook
Using a vagrant template with Chef Client installed, run kitchen converge
Expected Result
Kitchen should throw an error saying that the chef-client.bat could not be found.
Actual Result
Kitchen exits successfully without running Chef at all. Example output below:
> kitchen converge
-----> Starting Test Kitchen (v3.2.2)
-----> Converging <default-windows2016-windowsonly>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 7.2.2...
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
-----> Installing Chef install only if missing package
Downloading package from https://packages.chef.io/files/stable/chef/17.10.3/windows/2016/chef-client-17.10.3-1-x64.msi
Download complete.
Successfully verified C:\Users\packer\AppData\Local\Temp\chef-client-17.10.3-1-x64.msi
Installing Chef package C:\Users\packer\AppData\Local\Temp\chef-client-17.10.3-1-x64.msi
Installation complete
Transferring files to <default-windows2016-windowsonly>
Downloading files from <default-windows2016-windowsonly>
Finished converging <default-windows2016-windowsonly> (2m39.81s).
Conversely, RHEL does throw an error in this same situation: sudo: /opt/cinc/bin/chef-client: command not found
➕ Additional context
This behavior was reproduced using...
Vagrant driver with virtualbox provider
vCenter driver
The fact that chef-client could not be found was only discovered by enabling WinRM transcripts in the guest OS. This revealed the following error, which was not surfaced by kitchen:
The term 'C:\cinc-project\cinc\bin\chef-client.bat' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
👻 Brief Description
When running
kitchen converge
for a Windows guest, no error is returned ifchef-client.bat
is not found in the guest. Instead, converge exits successfully without running chef.This was discovered when using CINC workstation locally against templates that were built with Chef Client instead of CINC Client.
Version
Environment
Windows 10 with CINC Workstation 22.4.861.
Steps to Reproduce
kitchen converge
Expected Result
Kitchen should throw an error saying that the chef-client.bat could not be found.
Actual Result
Kitchen exits successfully without running Chef at all. Example output below:
Conversely, RHEL does throw an error in this same situation:
sudo: /opt/cinc/bin/chef-client: command not found
➕ Additional context
This behavior was reproduced using...
The fact that chef-client could not be found was only discovered by enabling WinRM transcripts in the guest OS. This revealed the following error, which was not surfaced by kitchen:
Workaround
Specify the path to chef-client in
.kitchen.yml
:The text was updated successfully, but these errors were encountered: