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

removing a job (including multibranch/org folder branches/repos) does not remove the workspace

    XMLWordPrintable

Details

    • 2.0.21

    Description

      Removal of a job leaves the workspace intact.

      Attachments

        Issue Links

          Activity

            davida2009 David Aldrich added a comment -

            jglick Thanks for your reply. I'm afraid I'm stuck on this one. I don't understand what the console message means nor where to look in order to fix it. Please will you explain what I need to do?

            davida2009 David Aldrich added a comment - jglick Thanks for your reply. I'm afraid I'm stuck on this one. I don't understand what the console message means nor where to look in order to fix it. Please will you explain what I need to do?
            jglick Jesse Glick added a comment -

            Please ask batmat in JENKINS-21942, who was the last to work on that area.

            jglick Jesse Glick added a comment - Please ask batmat in JENKINS-21942 , who was the last to work on that area.

            I am using Jenkins 2.204.3 and Pipeline Plugin 2.6 and this issue is clearly reproducible for me.
            I delete the job with a "Delete Pipeline" button and I see all these workspaces present on every node:

            • <workspace> itself
            • <workspace>@1,2,3...
            • <workspace>@tmp

            Should I reopen this ticket or wait for the next version of the core or plugin?

            alexander_samoylov Alexander Samoylov added a comment - I am using Jenkins 2.204.3 and Pipeline Plugin 2.6 and this issue is clearly reproducible for me. I delete the job with a "Delete Pipeline" button and I see all these workspaces present on every node: <workspace> itself <workspace>@1,2,3... <workspace>@tmp Should I reopen this ticket or wait for the next version of the core or plugin?
            jglick Jesse Glick added a comment -

            alexander_samoylov neither. You should file a fresh issue with complete, self-contained, explicit steps to reproduce from scratch, and Link to this one. (By the way “Pipeline Plugin 2.6” is meaningless. This is just an aggregator with no code.)

            jglick Jesse Glick added a comment - alexander_samoylov neither. You should file a fresh issue with complete, self-contained, explicit steps to reproduce from scratch, and Link to this one. (By the way “Pipeline Plugin 2.6” is meaningless. This is just an aggregator with no code.)
            p_hampson Paul "TBBle" Hampson added a comment - - edited

            I just came across the warning referring to this ticket, on a Jenkins deployment with no executors on the Jenkins node (which should not happen).

            > JENKINS-2111 path sanitization ineffective when using legacy Workspace Root Directory

            There are actually two possible sources of this warning in the Branch API Plugin itself, checked on v2.6.2.

            If the message is immediately followed (assuming you have FINE logging visible, otherwise you won't see it) by
            > no available workspace root for hudson.model.Hudson@...

            then it's come from a call to locate, which will happen when a job is deleted or renamed, as the Deleter runs a task on each node (jenkins.getNodes()), which will trigger a call to locate for the Jenkins node, which hits this warning, returns null, and is ignored.

            If no such message followed the warning (and you have FINE logging visible), then it might have come from Collector reacting to the Jenkins node coming online and calling getWorkspaceRoot directly, which will again return null and be ignored.

            This warning means it won't clean up orphaned/renamed workspaces on the Jenkins node, but if you have no executor there, then you shouldn't have any to clean up anyway.

            Edit: I just noticed that JENKINS-60451 was logged for exactly this.

            p_hampson Paul "TBBle" Hampson added a comment - - edited I just came across the warning referring to this ticket, on a Jenkins deployment with no executors on the Jenkins node ( which should not happen ). > JENKINS-2111 path sanitization ineffective when using legacy Workspace Root Directory There are actually two possible sources of this warning in the Branch API Plugin itself, checked on v2.6.2 . If the message is immediately followed (assuming you have FINE logging visible, otherwise you won't see it) by > no available workspace root for hudson.model.Hudson@... then it's come from a call to locate , which will happen when a job is deleted or renamed, as the Deleter runs a task on each node ( jenkins.getNodes() ), which will trigger a call to locate for the Jenkins node, which hits this warning, returns null , and is ignored. If no such message followed the warning (and you have FINE logging visible), then it might have come from Collector reacting to the Jenkins node coming online and calling getWorkspaceRoot directly, which will again return null and be ignored. This warning means it won't clean up orphaned/renamed workspaces on the Jenkins node, but if you have no executor there, then you shouldn't have any to clean up anyway. Edit: I just noticed that JENKINS-60451 was logged for exactly this.

            People

              jglick Jesse Glick
              bll6969 bll
              Votes:
              90 Vote for this issue
              Watchers:
              100 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: