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

Workspace remains on disk after job has been ( deleted, moved, renamed )

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      1.590
      redhat 5
      Java 7
    • Similar Issues:

      Description

      Scenario_1:

      Job foo runs once and creates a workspace named "foo".
      After renaming foo to foofoo the workspace "foo" still exists if it wasn't deleted manually.
      If foofoo runs now it creates it's own workspace.

      # ls 
      foo 
      foofoo
      

      The problem by having multiple jobs with huge workspaces is the disk space. In addition to that it's not nice to have some dead folders lying around on your file-system.

      Scenario_2:
      If job foo is executed in parallel it creates multiple workspaces.
      This is fine as long as you're not using the "Wipe Out Current Workspace" button.
      If so the only workspace that is getting deleted is foo but not the additional ones.

      Example before wiping the workspace:

      #ls
      foo
      foo@2
      foo@3
      foo@4
      

      Example after wiping the workspace:

      #ls
      
      foo@2
      foo@3
      foo@4
      

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Straightforward workaround present (remove workspaces manually), therefore reducing priority.

            Additional scenario: Roaming jobs probably also retain their older workspaces on other nodes when deleting the current one.

            Show
            danielbeck Daniel Beck added a comment - Straightforward workaround present (remove workspaces manually), therefore reducing priority. Additional scenario: Roaming jobs probably also retain their older workspaces on other nodes when deleting the current one.
            Hide
            danielbeck Daniel Beck added a comment -

            The problem of course is offline nodes while performing the action. Those simply cannot be updated.

            Show
            danielbeck Daniel Beck added a comment - The problem of course is offline nodes while performing the action. Those simply cannot be updated.
            Hide
            gggeek Gaetano Giunta added a comment - - edited

            Removing workspaces dirs manually involves at least one shell script which checks if no corresponding jobs exist any more.
            And, when slaves do exist, it is not as easy as that.
            I wouldn't mind a plugin, but it should be available as a feature.

            Show
            gggeek Gaetano Giunta added a comment - - edited Removing workspaces dirs manually involves at least one shell script which checks if no corresponding jobs exist any more. And, when slaves do exist, it is not as easy as that. I wouldn't mind a plugin, but it should be available as a feature.

              People

              • Assignee:
                Unassigned
                Reporter:
                jthenne Jan Henne
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: