[
https://issues.apache.org/jira/browse/MESOS-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545915#comment-14545915
]
Steven Schlansker commented on MESOS-1375:
------------------------------------------
Sorry to sound frustrated. After digging a little bit, I realize that my issue
is as much with Mesosphere's packaging of Mesos as it is the Mesos
configuration itself. There's a couple of issues here that all come together
to make it very hard to create a "production ready" logrotate setup.
* GLOG's log rotation is wacky. It seems to rotate logs in part based on
service restarts, so the interval between rotations is extremely irregular. We
will have 10 log files created in quick succession if a slave has issues
starting up (right now I have 20 files for a single day we had a lot of issues
in). Other times during periods of great stability but high task load, we will
end up with a single log file covering most of a month and grow to 10GB
* Mesosphere's init scripts do not allow easy customization of GLOG
configuration (not that it is very configurable to start with)
* Mesosphere's init scripts hardwire stdout / stderr from mesos-master and
mesos-slave to go to syslog's user facility, which is overloaded by just about
every project that uses syslog
My ideal setup honestly would be to to pipe process stdout / stderr through
something like Apache's 'rotatelogs' command, or to improve the Mesos
integration with 'logrotate' so it can signal properly and not need
'copytruncate' which has known race conditions. I tried the logrotate 'hack'
linked above and we did not find much success over three or four iterations.
It may be possible to get it working nicely, in which case maybe the only
change needed is a documentation fix of "This is the official way to get Mesos
logs rotation to work" along with some user education. Happy to expand on any
of these points if that would be helpful. Thanks!
> Log rotation capable
> --------------------
>
> Key: MESOS-1375
> URL: https://issues.apache.org/jira/browse/MESOS-1375
> Project: Mesos
> Issue Type: Improvement
> Components: master, slave
> Affects Versions: 0.18.0
> Reporter: Damien Hardy
> Labels: ops, twitter
>
> Please provide a way to let ops manage logs.
> A log4j like configuration would be hard but make rotation capable without
> restarting the service at least.
> Based on external logrotate tool would be great :
> * write to a constant log file name
> * check for file change (recreated by logrotate) before write
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)