diff options
author | Micah Anderson <micah@leap.se> | 2015-07-21 11:00:50 -0400 |
---|---|---|
committer | Micah Anderson <micah@leap.se> | 2015-07-21 11:00:50 -0400 |
commit | 7c071c8e5953922040175c9bfdb458effb982847 (patch) | |
tree | ddc56639a1438d1aeea5d528359df7cc3a5f5621 /tests | |
parent | d609a948520e38feb79892eec6c80f3915940444 (diff) |
Fix leap-mx logrotation to work with twistd (#7058)
We don't want to try and create the log file, twistd will do that.
Don’t rename the log file from mx.log to mx.log.0, instead just copy it
to mx.log.1, and then clear out mx.log so it’s empty (this is needed
because leap-mx might assume that its file descriptor is still valid and
continue trying to write to it, without this, leap-mx might lose data
because it’ll assume the original log file is still around and continue
to write to it, even though it’s gone)It’s a little dangerous because
it’s possible that you might lose some logged data between the time that
logrotate copies the new log file and truncates the old file (Caveat
administrator).
Finally, we don't want logrotate to complain if it finds
mx.log, its ok if its there.
Change-Id: I9952627f4d47e7a89a2915f6b72d82f9e6ca0d8b
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions