Skip to content

Commit d7b7171

Browse files
committed
Merge pull request #1235 from remibergsma/fix-passwd-server-logging
CLOUDSTACK-9155 make sure logrotate is effective for cloud.logMany processes on the VRs log to cloud.log. When log rotate kicks in, the file is rotated but the scripts still write to the old inode (cloud.log.1 after rotate). Tis quickly fills up the tiny log partition. Using 'copytruncate' is a small tradeoff, there is a slight change of missing a log entry, but in the old situation nothing ended up in cloud.log after rotate (except for stuff that was (re)started) so I think this is the best solution until we properly rewrite the script to either use their own script or syslog. More details: https://issues.apache.org/jira/browse/CLOUDSTACK-9155 * pr/1235: CLOUDSTACK-9155 make sure logrotate is effective Signed-off-by: Remi Bergsma <github@remi.nl>
2 parents fcccaaa + 636efa2 commit d7b7171

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • systemvm/patches/debian/config/etc/logrotate.d

systemvm/patches/debian/config/etc/logrotate.d/cloud

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@
2222
notifempty
2323
compress
2424
delaycompress
25+
# CLOUDSTACK-9155: We cannot tell the processes that are writing to this
26+
# file to use the new inode, so instead we copy the original file, truncate
27+
# it and keep the same inode.
28+
copytruncate
2529
}

0 commit comments

Comments
 (0)