The patch in lp:~jibel/ubuntu/precise/jenkins/LP993065_Keep_logging_after_rotation uses copytruncate so jenkins doesn't lose the original file handle. It is backported from Quantal.
** Description changed: There is a postrotate action missing from /etc/logrotate.d/jenkins to reload jenkins after log rotation. Currently jenkins log file stop updating after log rotation. + + [Test Case] + 1. Start Jenkins + 2. Check that messages are logged in /var/log/jenkins/jenkins.log + 3. Rotate the logs: + $ sudo logrotate -f /etc/logrotate.d/jenkins + 4. Check the the log has been rotated (a 0 byte jenkins.log file has been created) + 5. Wait for a message to be logged by executing a job for example. + + Result: + Without this fix: The log file /var/log/jenkins/jenkins.log remains empty + With this fix: A message is logged in /var/log/jenkins/jenkins.log + + [Regression Potential] + None, since nothing is logged currently after log rotation. ProblemType: Bug DistroRelease: Ubuntu 12.10 Package: jenkins (not installed) ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14 Uname: Linux 3.2.0-24-generic x86_64 ApportVersion: 2.0.1-0ubuntu7 Architecture: amd64 Date: Wed May 2 08:55:23 2012 InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64+mac (20120328) ProcEnviron: - TERM=xterm - PATH=(custom, no user) - LANG=en_US.UTF-8 - SHELL=/bin/bash + TERM=xterm + PATH=(custom, no user) + LANG=en_US.UTF-8 + SHELL=/bin/bash SourcePackage: jenkins UpgradeStatus: No upgrade log present (probably fresh install) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/993065 Title: reload jenkins after log rotation To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/jenkins/+bug/993065/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
