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

Build creates second workspace@2 for non-concurrent build configuration

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core, matrix-project-plugin
    • None
    • OS: Ubuntu 12.04 64-bit
      Jenkins: 1.609.1 (upgraded from 1.580.3)
      disk-usage plugin: 0.25 (upgraded from 0.24)
      Matrix Project Plugin: 1.6 (upgraded from 1.4.1)
    • Jenkins Core 2.136

      I didn't have this issue when I was using ver 1.580.3.
      After upgrading Jenkins ver 1.609.1 (together with other Jenkins plugins update),
      I started to see this issue.

      My jenkins job is using multi-config project type (aka Matrix project),
      and has 3 variants.
      I didn't set to be run concurrently,
      so the 3 variants will start the build one by one.

      In the previous version 1.580.3,
      it will reuse the same workspace folder for all of 3 variant builds.

      In the new version 1.609.1,
      when multiple jobs are triggerd,
      I can see sometimes the first variant build of the second job
      will start to create and use workspace@2
      instead of re-using original worksapce.

      Note:
      I'm also using disk-usage plugin.
      At the end of build,
      it will trigger that plugin to calculate workspace disk space.
      My work space tends to be large and sometimes it take several minutes to finish.

      I suspect it's that disk-usage plugin still occupying the original worksapce,
      but the second job in queue starts earlier,
      so it creates workspace@2 for the first variable build.

      From workspace@2,
      I always see only one variant only under AXIS folder.

          [JENKINS-30231] Build creates second workspace@2 for non-concurrent build configuration

          Rick Liu created issue -

          Rick Liu added a comment -

          Per comment from Jesse Glick,
          I create this separate issue
          which has similar symptom.

          Rick Liu added a comment - Per comment from Jesse Glick, I create this separate issue which has similar symptom.
          Rick Liu made changes -
          Link New: This issue is related to JENKINS-21622 [ JENKINS-21622 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 165324 ] New: JNJira + In-Review [ 181925 ]

          Will Berriss added a comment -

          I am seeing this issue today on one of my pipelines. Is there a quick fix workaround I can use to get rid of it and reset the pipeline? I don't mind starting the pipeline from scratch again - just wondering how to get rid of the @2 workspace. Anyone know?

          Will Berriss added a comment - I am seeing this issue today on one of my pipelines. Is there a quick fix workaround I can use to get rid of it and reset the pipeline? I don't mind starting the pipeline from scratch again - just wondering how to get rid of the @2 workspace. Anyone know?

          Matthew Smith added a comment -

          will177 It looks like this might be a solution: https://issues.jenkins-ci.org/browse/JENKINS-14354

          It looks like you can replace the "@" separator with a separator of your choice.

          Matthew Smith added a comment - will177 It looks like this might be a solution: https://issues.jenkins-ci.org/browse/JENKINS-14354 It looks like you can replace the "@" separator with a separator of your choice.

          Rick Liu added a comment -

          I use customize worksapce configuration to hardcoded the workspace name to work-around this problem

          Rick Liu added a comment - I use customize worksapce configuration to hardcoded the workspace name to work-around this problem

          This is still a problem. We restrict our jobs to one per node and still see a number of @2 workspaces. Replacing @ with _ (like JENKINS-14354) helps builds which get tripped up by @ but we still have duplication. As we have a number of large workspaces this wastes a lot of diskspace.

          Russell Gallop added a comment - This is still a problem. We restrict our jobs to one per node and still see a number of @2 workspaces. Replacing @ with _ (like JENKINS-14354 ) helps builds which get tripped up by @ but we still have duplication. As we have a number of large workspaces this wastes a lot of diskspace.

          We've recently started seeing a duplicate @2 workspace as well, when we moved from 2.60.3 to 2.73.2 with some new plug in.

           

          nolan de souza added a comment - We've recently started seeing a duplicate @2 workspace as well, when we moved from 2.60.3 to 2.73.2 with some new plug in.  
          James Dumay made changes -
          Remote Link New: This issue links to "CloudBees Internal CD-480 (Web Link)" [ 20531 ]

            dnusbaum Devin Nusbaum
            totoroliu Rick Liu
            Votes:
            4 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: