diff options
-rw-r--r-- | lib/chef/application/windows_service.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index 05828424c4..b42a01cfdb 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -192,6 +192,12 @@ class Chef result = shell_out("chef-client #{config_params}", :timeout => Chef::Config[:windows_service][:watchdog_timeout]) Chef::Log.debug "#{result.stdout}" Chef::Log.debug "#{result.stderr}" + rescue Mixlib::ShellOut::CommandTimeout => e + Chef::Log.error "chef-client timed out\n(#{e})" + Chef::Log.error(<<-EOF) + Your chef-client run timed out. You can increase the time chef-client is given + to complete by configuring windows_service.watchdog_timeout in your client.rb. + EOF rescue Mixlib::ShellOut::ShellCommandFailed => e Chef::Log.warn "Not able to start chef-client in new process (#{e})" rescue => e |