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

Hudson 1.334 build fails with custom workspace on windows drive with no subdir

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: Windows XP
    • Similar Issues:
      Show 5 results

      Description

      Upgraded to 1.334 and encountered a problem with using a custom workspace:
      FATAL: Failed to mkdirs: D:\devtools\Hudson\N:\
      java.io.IOException: Failed to mkdirs: D:\devtools\Hudson\N:\
      at hudson.FilePath.mkdirs(FilePath.java:744)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1004)
      at
      hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:431)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:378)
      at hudson.model.Run.run(Run.java:1176)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:123)

      I have the custom workspace set to N:\ which is a substed drive on a Windows XP
      machine. Not sure if the substing is relevant, but figured I'd mention it (I'm
      guessing not). Rolling back to 1.333 fixed the issue for me.

        Attachments

          Activity

          Hide
          mindless Alan Harder added a comment -

          This is caused by:
          https://hudson.dev.java.net/source/browse/hudson?view=rev&rev=23656

          It does check for absolute path, so it shouldn't append your N:\ onto the root
          dir of the node... however, the check for absolute is "[A-Za-z]:
          .+" which
          means it assumes there is at least one character after the backslash.. in your
          case there is none. I'll change it to .* so your path here will be recognized
          as absolute.

          Show
          mindless Alan Harder added a comment - This is caused by: https://hudson.dev.java.net/source/browse/hudson?view=rev&rev=23656 It does check for absolute path, so it shouldn't append your N:\ onto the root dir of the node... however, the check for absolute is " [A-Za-z] : .+" which means it assumes there is at least one character after the backslash.. in your case there is none. I'll change it to .* so your path here will be recognized as absolute.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/FilePath.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23832
          Log:
          [FIXED JENKINS-4894] update DRIVE_PATTERN so a path like C:\ is recognized as absolute

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/FilePath.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23832 Log: [FIXED JENKINS-4894] update DRIVE_PATTERN so a path like C:\ is recognized as absolute
          Hide
          torbent torbent added a comment -

          I just ran into the same issue when upgrading to 1.334. However, our paths are
          not X:\, but more like X:/hudson/etc, with forward slashes. Yes, that works for
          Windows (at least for Hudson on Windows), and I'd like to request that it keeps
          working.
          So "[A-Za-z]:
          ." should maybe be "[A-Za-z]:\\/."?
          Another question is whether a bare "X:" would be considered an absolute dir? The
          regex doesn't.

          Show
          torbent torbent added a comment - I just ran into the same issue when upgrading to 1.334. However, our paths are not X:\, but more like X:/hudson/etc, with forward slashes. Yes, that works for Windows (at least for Hudson on Windows), and I'd like to request that it keeps working. So " [A-Za-z] : . " should maybe be " [A-Za-z] : \\/ . "? Another question is whether a bare "X:" would be considered an absolute dir? The regex doesn't.
          Hide
          torbent torbent added a comment -

          (forgot to CC myself)

          Show
          torbent torbent added a comment - (forgot to CC myself)
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/FilePath.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23889
          Log:
          [FIXED JENKINS-4894] match windows absolute path like C:/path as requested by torbent.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/FilePath.java http://fisheye4.cenqua.com/changelog/hudson/?cs=23889 Log: [FIXED JENKINS-4894] match windows absolute path like C:/path as requested by torbent.
          Hide
          mindless Alan Harder added a comment -

          I added the / but did not allow no \ or /. When I do "dir C:" it seems
          relative, as it shows the cwd on C: and not the root dir of C:.

          Show
          mindless Alan Harder added a comment - I added the / but did not allow no \ or /. When I do "dir C:" it seems relative, as it shows the cwd on C: and not the root dir of C:.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          branches/rc/core/src/main/java/hudson/FilePath.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23890
          Log:
          JENKINS-4894 merge r23889 to rc branch for 1.335

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: branches/rc/core/src/main/java/hudson/FilePath.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23890 Log: JENKINS-4894 merge r23889 to rc branch for 1.335
          Hide
          torbent torbent added a comment -

          Verified as working in 1.335

          Show
          torbent torbent added a comment - Verified as working in 1.335

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              mrobinet mrobinet
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: