Hi. I would recommend you use reload for apache restarts. Reload does a config check before the reload and if there is an issue it won't reload the config.
I am also wondering if you have you had a look at the puppetlabs/apache module on puppet forge? It does just about everything you will need to do with apache. On 12/07/2013 1:08 AM, "Robertov" <[email protected]> wrote: > > Hi all, > > Today, one of our webservers received a minor apache configuration but apache2 was not properly restarted. There was no configuration issue, as I could start apache2 directly. Also, the update was tested, and rolled out to other servers without problems. Perhaps puppet did not wait long enough for apache to restart? Is there a better way to reload apache or to check at the end of the puppet run that the service is still running? > > Puppet log: > > Jul 11 13:49:59 server puppet-agent[14626]: (/Stage[main]/Apache::Base/File[/etc/apache2/apache2.conf]/content) content changed '{md5}fe2fb10592a986a87e1c650ee7dff249' to '{md5}13ed970f0654b8587c39b41a1e5c2724' > Jul 11 13:50:04 server puppet-agent[14626]: (/Stage[main]/Apache::Base/File[/etc/apache2/conf.d/other-vhosts-access-log]/content) content changed '{md5}2cad303fc4221d6b0068a8b37597b9fb' to '{md5}db2ece1dec5b1300c6269164d00df8ef' > Jul 11 13:50:20 server puppet-agent[14626]: (/Stage[main]/Apache::Base/Service[apache2]) Triggered 'refresh' from 2 events > Jul 11 13:50:20 server puppet-agent[14626]: Finished catalog run in 22.28 seconds > > > Apache error log: > > [Thu Jul 11 13:50:22 2013] [warn] child process 16649 still did not exit, sending a SIGTERM > [Thu Jul 11 13:50:22 2013] [warn] child process 30055 still did not exit, sending a SIGTERM > [Thu Jul 11 13:50:24 2013] [warn] child process 16649 still did not exit, sending a SIGTERM > [Thu Jul 11 13:50:24 2013] [warn] child process 30055 still did not exit, sending a SIGTERM > [Thu Jul 11 13:50:26 2013] [warn] child process 16649 still did not exit, sending a SIGTERM > [Thu Jul 11 13:50:26 2013] [warn] child process 30055 still did not exit, sending a SIGTERM > [Thu Jul 11 13:50:28 2013] [error] child process 16649 still did not exit, sending a SIGKILL > [Thu Jul 11 13:50:28 2013] [error] child process 30055 still did not exit, sending a SIGKILL > [Thu Jul 11 13:50:29 2013] [notice] caught SIGTERM, shutting down > [Thu Jul 11 13:53:08 2013] manually started apache > > Service definition: > > service { "apache2": > ensure => running, > provider => base, > pattern => "apache2", > start => "/etc/init.d/apache2 start", > hasstatus => true, > hasrestart => true, > require => Package["apache2"], > } > > robert > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
