Just want to mention that you are not the first one who thinks the
service type is to slow:
http://projects.puppetlabs.com/issues/13575
So if you get any more insight view feel free to update the ticket :-)
I thought that it may be because puppet will not catch the output of executed
commands directly but redirects the output to a tempfile, reads the tempfile
and then deletes the tempfile again. It even handles the fact, that the tempfile
may not be present and puppet has to wait for the file to be created. But looking
at your output it seems that the `wait_for_output` method is not triggered in your
case.
It may be interesting to now if the time is really lost in the execute
method or elsewhere. Maybe adding some more debug output like:
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index 5b5a9d7..94c7e32 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -365,6 +365,8 @@ module Util
str = command
end
+ Puppet.info "Start #{command} at #{Time.now}" if command =~ /\/sbin\/(chkconfig|service)/
+
if respond_to? :debug
debug "Executing '#{str}'"
else
@@ -406,6 +408,8 @@ module Util
raise ExecutionFailure, "Execution of '#{str}' returned #{exit_status}: #{output}"
end
+ Puppet.info "Start #{command} at #{Time.now}" if command =~ /\/sbin\/(chkconfig|service)/
+
output
end
can help here?
-Stefan