summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-04 18:32:18 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-05 20:15:00 -0700
commit54d23a6ace8dd2e915104ede6926bef0fe00a6cd (patch)
tree2c34f8dd5afc52b7c60769f6d32101274b7ca577
parent3858a046f6d0f554fed931911099111a41337150 (diff)
downloadchef-54d23a6ace8dd2e915104ede6926bef0fe00a6cd.tar.gz
Explain why we're sleeping
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/chef_client_launchd.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/resource/chef_client_launchd.rb b/lib/chef/resource/chef_client_launchd.rb
index 17a180119e..41f50dd1ad 100644
--- a/lib/chef/resource/chef_client_launchd.rb
+++ b/lib/chef/resource/chef_client_launchd.rb
@@ -133,6 +133,10 @@ class Chef
action :enable
end
+ # We want to make sure that after we update the chef-client launchd config that we don't move on to another recipe
+ # before the restarter daemon can do its thing. This sleep avoids killing the client while it's doing something like
+ # installing a package, which could be problematic. It also makes it a bit more clear in the log that the killed process
+ # was intentional.
chef_sleep "Sleep before client restart" do
seconds 10
action :nothing