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
We have looked into this issue extensively. We are not using a polling mechanism, but using knife winrm to execute chef-client runs. We are using a special exit code to determine if we are rebooting. Then the automated system on the other side will get that exit code and know what to do with it.
Basically we are using exit codes to notify the runner to say, this is expected, versus using straight raise, because we would have to parse the output to figure out if it was expected.
I would be willing to share some of what we have started doing if interested. I haven't gotten to the point of open sourcing both sides yet, but I could easily enough include the LWRPs. FYI - we currently depend on the windows reboot handler.
The text was updated successfully, but these errors were encountered:
@vinyar We might of. Talked to alot of people at ChefConf. Basically this code, is in an LWRP we have that exits. We schedule a delayed reboot right before hand so we can guarantee we are the latest reboot schedule (Delayed notifications bump into eachother when setting common node run state)
action :Exit do
rubyblock=Chef::Resource::RubyBlock.new("#{@new_resource.name}_chefcore_rubyblock", @run_context)
rubyblock.block do
puts "Stopping chef run for an immediate reboot";
exit 250;
end
rubyblock.run_action(:run)
end
We have looked into this issue extensively. We are not using a polling mechanism, but using knife winrm to execute chef-client runs. We are using a special exit code to determine if we are rebooting. Then the automated system on the other side will get that exit code and know what to do with it.
Basically we are using exit codes to notify the runner to say, this is expected, versus using straight raise, because we would have to parse the output to figure out if it was expected.
I would be willing to share some of what we have started doing if interested. I haven't gotten to the point of open sourcing both sides yet, but I could easily enough include the LWRPs. FYI - we currently depend on the windows reboot handler.
The text was updated successfully, but these errors were encountered: