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

When 'Discard old builds' is specified using 'Max # of builds to keep' in matrix job - all job history is deleted on master together with folder for the last label used in the job

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • core
    • None
    • java version 1.6.0_20
      OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
      Jenkins version 1.458
      Jenkins server is being run on Fedora 14 ( as deamon)
      Jenkins slaves are being run on Windows 7 and Red Hat Operating systems.

      I use "Max # of builds to keep" to discard old builds.

      When "Max # of builds to keep" reaches the max number set for a given job - Jenkins deletes entire folder of last label value used in this job. For example I have labels set to:
      BldT with value Debug
      TrgtT with value Win32
      slvT with value GP

      So the internal content of the job folder structure has ../BldT/Debug/TrgT/Win32/slvT/GP/..

      Then when "Max # of builds to keep" is reached - directory GP is deleted. This happens to most of the jobs I have.

      The only way we found to fix this is to 'Save' or 'Apply' changes in the job configuration page (without making any changes to the job). This restores the folder structure on master.

      Jenkins log for when this happens is:

      SEVERE: Failed to rotate log
      java.io.IOException: /jenkins-server/Home/jobs/PCompiler_sshaha2/configurations/axis-BldT/Debug/axis-TrgtT/Win32/axis-slvT/GP/builds/2012-05-06_14-11-06 is in use
      at hudson.model.Run.delete(Run.java:1239)
      at hudson.model.AbstractBuild.delete(AbstractBuild.java:380)
      at hudson.matrix.LinkedLogRotator.perform(LinkedLogRotator.java:64)
      at hudson.model.Job.logRotate(Job.java:336)
      at hudson.model.Run.run(Run.java:1478)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)

            Unassigned Unassigned
            jumptolibc Anna Gon
            Votes:
            8 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: