summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-02-26 19:08:44 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2015-02-26 19:10:40 -0800
commit33e5f7249a0f075b861e4fccf1ad3228f93fd26f (patch)
tree6e29cc9b670e308e49d8e4d5003e1fecb20321d5 /lib
parent00334a60563dd916ef353abb739cd9793263fa38 (diff)
downloadchef-33e5f7249a0f075b861e4fccf1ad3228f93fd26f.tar.gz
Add help for windows service timeout
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/application/windows_service.rb6
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