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

Build records not migrated due to “failed to rename” on Windows

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      1.597 on Windows
    • Similar Issues:

      Description

      After updating from 1.596 to 1.597 I seem to have wrong "last success" timestamps. See attached images.

        Attachments

        1. 2014-11-26_03-40-28 build.xml
          5 kB
        2. build.png
          build.png
          6 kB
        3. builds directory.jpg
          builds directory.jpg
          170 kB
        4. Error Log SH - 3953 .txt
          902 kB
        5. jenkins.err.log_on-startup.txt
          119 kB
        6. job.dir.txt
          0.8 kB
        7. job-builds.dir.txt
          0.8 kB
        8. lastSuccess.png
          lastSuccess.png
          6 kB
        9. tag-builds-dir.txt
          1 kB

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/jenkins/model/RunIdMigrator.java
            core/src/test/java/jenkins/model/RunIdMigratorTest.java
            http://jenkins-ci.org/commit/jenkins/4a75e058bafd3cd98832a2a129c9f23c71d26f55
            Log:
            JENKINS-26519 Attempting to improve diagnostics in case rename fails.
            (cherry picked from commit 0633beef0868c59a7e853731aee5f5c0745fa3fc)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/jenkins/model/RunIdMigrator.java core/src/test/java/jenkins/model/RunIdMigratorTest.java http://jenkins-ci.org/commit/jenkins/4a75e058bafd3cd98832a2a129c9f23c71d26f55 Log: JENKINS-26519 Attempting to improve diagnostics in case rename fails. (cherry picked from commit 0633beef0868c59a7e853731aee5f5c0745fa3fc)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/jenkins/model/RunIdMigrator.java
            http://jenkins-ci.org/commit/jenkins/22dc8add0e106d100a73c16cb628f1c5d1f94538
            Log:
            JENKINS-26519 More diagnostics in case a numeric rename target already exists.
            (cherry picked from commit 75c8c31f2fdc98081a0446dd3ee03da7243304a1)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/jenkins/model/RunIdMigrator.java http://jenkins-ci.org/commit/jenkins/22dc8add0e106d100a73c16cb628f1c5d1f94538 Log: JENKINS-26519 More diagnostics in case a numeric rename target already exists. (cherry picked from commit 75c8c31f2fdc98081a0446dd3ee03da7243304a1)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/jenkins/model/RunIdMigrator.java
            core/src/test/java/jenkins/model/RunIdMigratorTest.java
            http://jenkins-ci.org/commit/jenkins/7f82ab94a4f6247abaf9f65998360be5c3136bf8
            Log:
            [FIXED JENKINS-26519] Build record migration failed on Windows using Java 6.
            In this environment, Util.createSymlink and .isSymlink are implemented, but resolveSymlink is not.
            (cherry picked from commit 388c4b5e6ba52037cae117c5c69f9f4156d41401)

            Conflicts:
            changelog.html

            Compare: https://github.com/jenkinsci/jenkins/compare/1debf06fe6d6...7f82ab94a4f6

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/jenkins/model/RunIdMigrator.java core/src/test/java/jenkins/model/RunIdMigratorTest.java http://jenkins-ci.org/commit/jenkins/7f82ab94a4f6247abaf9f65998360be5c3136bf8 Log: [FIXED JENKINS-26519] Build record migration failed on Windows using Java 6. In this environment, Util.createSymlink and .isSymlink are implemented, but resolveSymlink is not. (cherry picked from commit 388c4b5e6ba52037cae117c5c69f9f4156d41401) Conflicts: changelog.html Compare: https://github.com/jenkinsci/jenkins/compare/1debf06fe6d6...7f82ab94a4f6
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3961
            JENKINS-26519 Attempting to improve diagnostics in case rename fails. (Revision 4a75e058bafd3cd98832a2a129c9f23c71d26f55)
            JENKINS-26519 More diagnostics in case a numeric rename target already exists. (Revision 22dc8add0e106d100a73c16cb628f1c5d1f94538)
            [FIXED JENKINS-26519] Build record migration failed on Windows using Java 6. (Revision 7f82ab94a4f6247abaf9f65998360be5c3136bf8)

            Result = SUCCESS
            jesse glick : 4a75e058bafd3cd98832a2a129c9f23c71d26f55
            Files :

            • core/src/main/java/jenkins/model/RunIdMigrator.java
            • core/src/test/java/jenkins/model/RunIdMigratorTest.java

            jesse glick : 22dc8add0e106d100a73c16cb628f1c5d1f94538
            Files :

            • core/src/main/java/jenkins/model/RunIdMigrator.java

            jesse glick : 7f82ab94a4f6247abaf9f65998360be5c3136bf8
            Files :

            • core/src/test/java/jenkins/model/RunIdMigratorTest.java
            • core/src/main/java/jenkins/model/RunIdMigrator.java
            • changelog.html
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3961 JENKINS-26519 Attempting to improve diagnostics in case rename fails. (Revision 4a75e058bafd3cd98832a2a129c9f23c71d26f55) JENKINS-26519 More diagnostics in case a numeric rename target already exists. (Revision 22dc8add0e106d100a73c16cb628f1c5d1f94538) [FIXED JENKINS-26519] Build record migration failed on Windows using Java 6. (Revision 7f82ab94a4f6247abaf9f65998360be5c3136bf8) Result = SUCCESS jesse glick : 4a75e058bafd3cd98832a2a129c9f23c71d26f55 Files : core/src/main/java/jenkins/model/RunIdMigrator.java core/src/test/java/jenkins/model/RunIdMigratorTest.java jesse glick : 22dc8add0e106d100a73c16cb628f1c5d1f94538 Files : core/src/main/java/jenkins/model/RunIdMigrator.java jesse glick : 7f82ab94a4f6247abaf9f65998360be5c3136bf8 Files : core/src/test/java/jenkins/model/RunIdMigratorTest.java core/src/main/java/jenkins/model/RunIdMigrator.java changelog.html
            Hide
            forestjay Forest Handford added a comment -

            FYI: I ran into this same issue on CentOS 6.5. Old directories had symlinks like:
            lrwxrwxrwx. 1 jenkins jenkins 19 Apr 22 09:06 401 -> 2015-04-22_09-06-23

            New directories looked like:
            drwxr-xr-x. 2 jenkins jenkins 4096 Mar 1 01:28 317

            The UI showed the old builds as having run before I was born! In order to re-run the migration I did the following:
            sudo find /var/lib/jenkins/ -name legacyIds -delete
            sudo service jenkins restart

            Once this was done things looked correct.

            Show
            forestjay Forest Handford added a comment - FYI: I ran into this same issue on CentOS 6.5. Old directories had symlinks like: lrwxrwxrwx. 1 jenkins jenkins 19 Apr 22 09:06 401 -> 2015-04-22_09-06-23 New directories looked like: drwxr-xr-x. 2 jenkins jenkins 4096 Mar 1 01:28 317 The UI showed the old builds as having run before I was born! In order to re-run the migration I did the following: sudo find /var/lib/jenkins/ -name legacyIds -delete sudo service jenkins restart Once this was done things looked correct.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                tdtappe Heiko Tappe
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: