Issue #17445 has been updated by Matthaus Owens. Status changed from Merged - Pending Release to Closed
Released in Puppet 3.0.2-rc1 ---------------------------------------- Bug #17445: Race condition in logrotate config makes puppet agent crash. https://projects.puppetlabs.com/issues/17445#change-78108 Author: Virgil M Status: Closed Priority: Normal Assignee: Matthaus Owens Category: Target version: 3.0.2 Affected Puppet version: 3.0.1 Keywords: Branch: One a machine with both puppet agent and puppet master installed, the logrotate configuration for puppet 3.0.1 watches two files and tries to signal both puppet and puppet master twice. Puppet agent does not handle well two successive HUP signals, so it crashes. <pre> Nov 5 23:46:42 test-24 puppet-agent[23870]: Caught HUP; calling restart Nov 5 23:46:42 test-24 puppet-agent[23870]: Restarting with '/usr/bin/puppet agent --listen --no-client --color=false' Nov 5 23:46:42 test-24 puppet-master[1888]: Caught USR2; calling reopen_logs Nov 5 23:46:42 test-24 puppet-master[1888]: Reopening log files Nov 5 23:46:42 test-24 puppet-agent[23870]: Caught HUP; calling restart Nov 5 23:46:42 test-24 puppet-master[1888]: Caught USR2; calling reopen_logs Nov 5 23:46:42 test-24 puppet-agent[23870]: Restarting with '/usr/bin/puppet agent --listen --no-client --color=false' Nov 5 23:46:42 test-24 puppet-master[1888]: Reopening log files **Nov 5 23:46:42 test-24 puppet-agent[23870]: Could not run: deadlock; recursive locking** </pre> The deadlock should be fixed, but a workaround for this is to rewrite the log rotate configuration to: <pre> /var/log/puppet/masterhttp.log { missingok create 0644 puppet puppet compress rotate 4 postrotate pkill -USR2 -u puppet -f 'puppet master' || true endscript } /var/log/puppet/http.log { missingok create 0644 puppet puppet compress rotate 4 postrotate [ -e /etc/init.d/puppet ] && /etc/init.d/puppet reload > /dev/null 2>&1 || true endscript } </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
