Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/61964


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/61964/1

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: newchange
Gerrit-Change-Id: I048c6914b6bf7c93cc7d98658391ba90d388ff4b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to