Sometimes users report seeing exceptions such as

      ... jenkins.model.PeepholePermalink updateCache
      WARNING: Failed to update ... lastSuccessfulBuild permalink for ...
      java.io.IOException: Unable to delete /jenkins/jobs/.../builds/lastSuccessfulBuild
      	at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:112)
      	at jenkins.model.PeepholePermalink.writeSymlink(PeepholePermalink.java:200)
      	at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:150)
      	at jenkins.model.PeepholePermalink.resolve(PeepholePermalink.java:122)
      	at hudson.model.Job.getLastSuccessfulBuild(Job.java:857)
      

      In one case this was discovered to be due to lastSuccessfulBuild being an actual directory rather than a symlink, due to an incorrect restoration from backup. But AtomicFileWriter should use Util.deleteFile or similar to make sure that Java 7 methods are first used to perform the deletion, which provide better diagnostics.

          [JENKINS-26195] Failed to update permalink: unable to delete

          Jesse Glick created issue -
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160186 ] New: JNJira + In-Review [ 180284 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-32443 [ JENKINS-32443 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-36088 [ JENKINS-36088 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-37862 [ JENKINS-37862 ]
          Jesse Glick made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: