Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8641

Add a logrotate definition to the Jenkins Debian package definition (similar to Apache, cron-apt, aptitude and apt)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Debian Linux i386 and AMD64
    • Similar Issues:
      Show 5 results

      Description

      The Debian package is a great convenience for me. It configures a user, registers the daemon, and makes installation and upgrade wonderful on Debian. I was surprised when I discovered /var/log/jenkins/jenkins.log with over 2 GB of log information on my machine.

      Other Debian packages seem to have some ability to configure their logrotate settings automatically (like Apache, apt, ppp, etc.). It would be nice if Jenkins could do the same.

        Attachments

          Activity

          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          We use daemon(1) to turn Jenkins into a daemon, but it doesn't appear to support log reopening via signal. So unfortunately this is bit tricky to get right.

          I guess we should let Jenkins directly write to a log file with --logfile, since Jenkins supports log reopening via SIGALRM. Doing this requires we capture PID of the Java process, not just the daemon process.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - We use daemon(1) to turn Jenkins into a daemon, but it doesn't appear to support log reopening via signal. So unfortunately this is bit tricky to get right. I guess we should let Jenkins directly write to a log file with --logfile, since Jenkins supports log reopening via SIGALRM. Doing this requires we capture PID of the Java process, not just the daemon process.
          Hide
          markewaite Mark Waite added a comment -

          I thought you could avoid the hassle of closing and reopening the log by using the copytruncate setting.

          I use this configuration:

          /var/log/jenkins/jenkins.log

          { daily copytruncate missingok compress delaycompress notifempty rotate 8 }
          Show
          markewaite Mark Waite added a comment - I thought you could avoid the hassle of closing and reopening the log by using the copytruncate setting. I use this configuration: /var/log/jenkins/jenkins.log { daily copytruncate missingok compress delaycompress notifempty rotate 8 }
          Hide
          resmo René Moser added a comment -
          Show
          resmo René Moser added a comment - Patch is in queue https://github.com/jenkinsci/jenkins/pull/106
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          debian/debian/jenkins.logrotate
          debian/debian/rules
          http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f
          Log:
          Merge pull request #109 from resmo/JENKINS-8641

          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: debian/debian/jenkins.logrotate debian/debian/rules http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f Log: Merge pull request #109 from resmo/ JENKINS-8641 JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5
          Log:
          recording JENKINS-8641 fix

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5 Log: recording JENKINS-8641 fix
          Hide
          aheritier Arnaud Héritier added a comment -

          fixed in changelog but issue not closed ?

          Show
          aheritier Arnaud Héritier added a comment - fixed in changelog but issue not closed ?
          Hide
          markewaite Mark Waite added a comment -

          New file /etc/logrotate.d/jenkins appeared in the 1.413 build.

          Show
          markewaite Mark Waite added a comment - New file /etc/logrotate.d/jenkins appeared in the 1.413 build.
          Hide
          markewaite Mark Waite added a comment -

          Works as I had hoped. I was a little surprised that it is retaining logs for a full year (rotate 52), but that probably better fits the needs of those who retain data for longer than I retain it.

          Show
          markewaite Mark Waite added a comment - Works as I had hoped. I was a little surprised that it is retaining logs for a full year (rotate 52), but that probably better fits the needs of those who retain data for longer than I retain it.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: René Moser
          Path:
          debian/debian/jenkins.logrotate
          debian/debian/rules
          http://jenkins-ci.org/commit/jenkins/8b09a585243287b6cb5270a0a1447995f1fc3dff
          Log:
          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: René Moser Path: debian/debian/jenkins.logrotate debian/debian/rules http://jenkins-ci.org/commit/jenkins/8b09a585243287b6cb5270a0a1447995f1fc3dff Log: JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          debian/debian/jenkins.logrotate
          debian/debian/rules
          http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f
          Log:
          Merge pull request #109 from resmo/JENKINS-8641

          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: debian/debian/jenkins.logrotate debian/debian/rules http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f Log: Merge pull request #109 from resmo/ JENKINS-8641 JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5
          Log:
          recording JENKINS-8641 fix

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5 Log: recording JENKINS-8641 fix
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: René Moser
          Path:
          debian/debian/jenkins.logrotate
          debian/debian/rules
          http://jenkins-ci.org/commit/jenkins/8b09a585243287b6cb5270a0a1447995f1fc3dff
          Log:
          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: René Moser Path: debian/debian/jenkins.logrotate debian/debian/rules http://jenkins-ci.org/commit/jenkins/8b09a585243287b6cb5270a0a1447995f1fc3dff Log: JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          debian/debian/jenkins.logrotate
          debian/debian/rules
          http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f
          Log:
          Merge pull request #109 from resmo/JENKINS-8641

          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: debian/debian/jenkins.logrotate debian/debian/rules http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f Log: Merge pull request #109 from resmo/ JENKINS-8641 JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5
          Log:
          recording JENKINS-8641 fix

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5 Log: recording JENKINS-8641 fix
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: René Moser
          Path:
          debian/jenkins.logrotate
          debian/rules
          http://jenkins-ci.org/commit/packaging/e4cc488c7222de80bb8505e016ee5caede4300e2
          Log:
          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.

          Originally-From: jenkins-ci.org/commit/core/8b09a585243287b6cb5270a0a1447995f1fc3dff

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: René Moser Path: debian/jenkins.logrotate debian/rules http://jenkins-ci.org/commit/packaging/e4cc488c7222de80bb8505e016ee5caede4300e2 Log: JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package. Originally-From: jenkins-ci.org/commit/core/8b09a585243287b6cb5270a0a1447995f1fc3dff
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          debian/jenkins.logrotate
          debian/rules
          http://jenkins-ci.org/commit/packaging/195bbb8c05e2ce1b96a4e3c1e45c1bc8077af4a8
          Log:
          Merge pull request #109 from resmo/JENKINS-8641

          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.
          Originally-From: jenkins-ci.org/commit/core/92aa65da2ebaeff58f4d33b8f0a067510043a20f

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: debian/jenkins.logrotate debian/rules http://jenkins-ci.org/commit/packaging/195bbb8c05e2ce1b96a4e3c1e45c1bc8077af4a8 Log: Merge pull request #109 from resmo/ JENKINS-8641 JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package. Originally-From: jenkins-ci.org/commit/core/92aa65da2ebaeff58f4d33b8f0a067510043a20f

            People

            • Assignee:
              resmo René Moser
              Reporter:
              markewaite Mark Waite
            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: