From: Tom Hughes Date: Tue, 11 Feb 2020 22:57:35 +0000 (+0000) Subject: Allow retrying of apache service actions X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/437ca67c1d15d1f9994007f36ebd17dd4ecad5c1?ds=sidebyside Allow retrying of apache service actions There seems to be an issue with the otrs cookbook when deployed on a new machine where it tries to both restart and also reload apache and the reload sometime fails because it seems to happen before the restart has completed. It's possible this is because the use of mod_perl for otrs is slowing down the restart but as a workaround we allow the reload action to be retried a couple of times. --- diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index ffa03c34c..925dda5ad 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -54,6 +54,8 @@ end service "apache2" do action [:enable, :start] + retries 2 + retry_delay 10 supports :status => true, :restart => true, :reload => true end