Ottomata has submitted this change and it was merged. Change subject: udp2log: let daemon recreate files after logrotate ......................................................................
udp2log: let daemon recreate files after logrotate When rotating a file, logrotate will recreate a file that belong to root:root then adjust the ownership to whatever the previous file had. On labs, the logs directory is a NFS mount which does not allow a file belonging to root to have ownership changed (root_squash is enabled by default). Hence logrotate fails to change the ownership back to udp2log:udp2log and the daemon is unable to write to the root owned file. I believe the udplog daemon is able to create the file whenever it does not exist. On initial startup with an empty logs directory, the daemon does create the files as it receives the UDP packets. bug: 47980 Change-Id: I048c6914b6bf7c93cc7d98658391ba90d388ff4b --- M templates/udp2log/logrotate_udp2log.erb 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/templates/udp2log/logrotate_udp2log.erb b/templates/udp2log/logrotate_udp2log.erb index c6c77b8..ff268fb 100644 --- a/templates/udp2log/logrotate_udp2log.erb +++ b/templates/udp2log/logrotate_udp2log.erb @@ -7,6 +7,7 @@ daily olddir <%= log_directory %>/archive notifempty + nocreate maxage 180 rotate 1000 dateext @@ -14,4 +15,4 @@ postrotate /usr/bin/killall -HUP udp2log endscript -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/61964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I048c6914b6bf7c93cc7d98658391ba90d388ff4b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar <has...@free.fr> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Ottomata <o...@wikimedia.org> Gerrit-Reviewer: Tim Starling <tstarl...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits