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

workspace cleanup removes workspaces for running job

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: hudson-wsclean-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.32.3, workspace cleanup plugin 1.0.5
    • Similar Issues:

      Description

      if we run a lot of copies of the same job with workspace cleanup enabled - every next job will clean up workspaces on slaves with already running jobs. jobs are executed in parallel, so perhaps it's better to check if workspace is used currently and belongs to running job before the cleanup. it's important for us because we have ENOSPACE with cleanup disabled and many failed jobs with cleanup enabled. running job copies one-by-one is not an option for us, because it will take a lot of time.

       

      thanks in advance

        Attachments

          Issue Links

            Activity

            Hide
            pjdarton pjdarton added a comment -

            Alexey Bychko I've uploaded an enhanced hudson-wsclean-plugin.hpi file.
            Try ticking the "use history" check-box (in the "Advanced" config). That'll change the plugin's behavior from "hit all slaves that could run this project except the one running this build right now" to "hit all slaves that previously ran this build except any running this build right now".
            That should allow you to have concurrent builds without a problem.
            Note: By default, it'll continue to use the old "hit all slaves that could've run this project" logic which is largely unchanged and will still bork a concurrent build - you'll need to select the new behavior in your job config.

            If you still have issues, create a log (manage jenkins -> system log) that logs de.jamba.hudson.plugin.wsclean at level "ALL", collect logs from that to see what it's doing wrong (as this code now logs what it's doing to the Jenkins logger as well as to the builds), and let me know further details.

            Show
            pjdarton pjdarton added a comment - Alexey Bychko I've uploaded an enhanced hudson-wsclean-plugin.hpi file. Try ticking the "use history" check-box (in the "Advanced" config). That'll change the plugin's behavior from "hit all slaves that could run this project except the one running this build right now" to "hit all slaves that previously ran this build except any running this build right now". That should allow you to have concurrent builds without a problem. Note: By default, it'll continue to use the old "hit all slaves that could've run this project" logic which is largely unchanged and will still bork a concurrent build - you'll need to select the new behavior in your job config. If you still have issues, create a log (manage jenkins -> system log) that logs de.jamba.hudson.plugin.wsclean at level "ALL", collect logs from that to see what it's doing wrong (as this code now logs what it's doing to the Jenkins logger as well as to the builds), and let me know further details.
            Hide
            pjdarton pjdarton added a comment -

            Arnaud Héritier I guess I could, although I'd prefer not to stay a maintainer long-term (I seem to adopt them much faster than I can let them go, and my boss would prefer me to get on with other things...)
            So, sure, I'll take over long enough to kick out a new release with the functionality I want to add, but I don't want to stay involved if I can avoid doing so

            In the meantime, can you merge PR#5 ? It should just be a simple button-click to do that and that'll then get the jenkinsci build engine to notice the plugin and start doing CI builds of the PRs...

            Show
            pjdarton pjdarton added a comment - Arnaud Héritier I guess I could, although I'd prefer not to stay a maintainer long-term (I seem to adopt them much faster than I can let them go, and my boss would prefer me to get on with other things...) So, sure, I'll take over long enough to kick out a new release with the functionality I want to add, but I don't want to stay involved if I can avoid doing so In the meantime, can you merge PR#5 ? It should just be a simple button-click to do that and that'll then get the jenkinsci build engine to notice the plugin and start doing CI builds of the PRs...
            Hide
            pjdarton pjdarton added a comment -

            Arnaud Héritier I've requested access.
            While I've linked back to your earlier approval in the comments here, if you could "approve" that PR then it may help speed things along.
            Similarly, if you can grant write access to the github area then that would also be helpful.

            Show
            pjdarton pjdarton added a comment - Arnaud Héritier I've requested access . While I've linked back to your earlier approval in the comments here, if you could "approve" that PR then it may help speed things along. Similarly, if you can grant write access to the github area then that would also be helpful.
            Hide
            pjdarton pjdarton added a comment -

            Update for anyone watching this:
            There's now a Pull Request that contains a fix for this issue (plus other enhancements). Anyone can download the .hpi file of the bugfixed plugin from there and then upload that (Manage Jenkins -> Manage Plugins ->Advanced -> Upload plugin) to their own Jenkins server(s) to try it out.

            It would be very helpful if everyone watching this could download and test that these changes fix the issue (and don't introduce any other big problems).
            You're all welcome to take a look at the code changes and comment on there too, if you're so inclined.

            Once I'm confident that everything is OK then I'll merge those changes in and release the new plugin officially.

            Show
            pjdarton pjdarton added a comment - Update for anyone watching this: There's now a Pull Request that contains a fix for this issue (plus other enhancements). Anyone can download the .hpi file of the bugfixed plugin from there and then upload that (Manage Jenkins -> Manage Plugins ->Advanced -> Upload plugin) to their own Jenkins server(s) to try it out. It would be very helpful if everyone watching this could download and test that these changes fix the issue (and don't introduce any other big problems). You're all welcome to take a look at the code changes and comment on there too, if you're so inclined. Once I'm confident that everything is OK then I'll merge those changes in and release the new plugin officially.
            Hide
            pjdarton pjdarton added a comment -

            Fixed in version 1.0.6, which was released today.

            Show
            pjdarton pjdarton added a comment - Fixed in version 1.0.6, which was released today.

              People

              • Assignee:
                pjdarton pjdarton
                Reporter:
                abychko Alexey Bychko
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: