Closed DamonStamper closed 6 years ago
The behavior is working as expected. The sql_server doesn't reboot mid-Chef run. It sends a notification to reboot that occurs at the end of a successful chef run.
https://docs.chef.io/resource_reboot.html (request_reboot explanation)
immediate_reboot is going to reboot the system immediately. If you are trying to replicate the sql_server functionality, try the delayed_reboot option.
Cookbook version
6.1.1
Chef-client version
12.19.36
Platform Details
Windows 2012R2 (Vagrant image ['opentable/win-2012r2-standard-amd64-nocm'][virtualbox, 1.0.0)] )
Scenario:
When using 'powershell::powershell5' to install a new version of powershell and setting the ['installation_reboot_mode'] attribute to 'immediate_reboot' the Chef run stops at system reboot even if there are further resources to evaluate.
Steps to Reproduce:
set ['installation_reboot_mode'] attribute to 'immediate_reboot'.
Expected Result:
Chef reboots the computer and continues with the rest of its evaluation.
Actual Result:
Chef reboots the computer and stops its evaluation thus requiring a second run.
Notes:
The sql_server cookbook's 'server' recipe allows a reboot mid-Chef run. That functionality should be also implemented in the powershell cookbook.
Applicable code in sql_server cookbook.