Chef 13 introduced new reboot behavior as covered in this RFC
In the latest versions of test kitchen, a reboot causes test kitchen to exit unsucessfully
Chef Development Kit Version: 1.3.43
chef-client version: 12.19.36
delivery version: master (dd319aa632c2f550c92a2172b9d1226478fea997)
berks version: 5.6.4
kitchen version: 1.16.0
How can test kitchen be configured to continue after a reboot in chef 13?
Converging 1 resources
Recipe: nd-ad-join::default
* domain_join[default] action join
* reboot[Restart Computer] action nothing (skipped due to action :nothing)
* registry_key[warning] action nothing (skipped due to action :nothing)
* windows_task[chef ad-join] action create
* registry_key[warning] action create (skipped due to only_if)
* powershell_script[ad-join] action run
- execute "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/vagrant/AppData/Local/Temp/chef-script20170419-2296-jd08h1.ps1"
* reboot[Restart Computer] action reboot_now[2017-04-19T16:41:53+00:00] WARN: Rebooting system immediately, requested by 'Restart Computer'
Running handlers:
Running handlers complete
Chef Client finished, 2/5 resources updated in 58 seconds
[2017-04-19T16:41:54+00:00] WARN: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>"Reboot by Chef", :timestamp=>2017-04-19 16:41:53 +0000, :requested_by=>"Restart Computer"}
Running handlers:
[2017-04-19T16:41:54+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-04-19T16:41:54+00:00] ERROR: Exception handlers complete
Chef Client failed. 2 resources updated in 58 seconds
[2017-04-19T16:41:54+00:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
[2017-04-19T16:41:54+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-19T16:41:54+00:00] FATAL: Chef::Exceptions::Reboot: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>"Reboot by Chef", :timestamp=>2017-04-19 16:41:53 +0000, :requested_by=>"Restart Computer"}
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <default-netdocuments-windows-2012r2>. Please see .kitchen/logs/default-netdocuments-windows-2012r2.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration