Active workspaces deleted on Jenkins startup

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We have observed on our Jenkins instance that on Jenkins startup, when Jenkins connects to the agents, active workspaces are being incorrectly deleted with the following message recorded in the agent logs:

      // deleting obsolete workspace /var/lib/jenkins/workspace/... 

      I cannot reproduce the issue by disconnecting and reconnecting agents after Jenkins has already started up.

      Our Jenkins controller has a fairly large number of jobs (around 240 repos in a Github organization folder). The Jenkins startup logs indicate that it takes a couple of minutes to load all the jobs, completing a couple of minutes after the agents are first launched. I suspect there is a race condition in WorkspaceLocatorImpl.Collector where the cleanup process is attempting to access jobs before they have been loaded, resulting in the workspace being deleted incorrectly.

            Assignee:
            Unassigned
            Reporter:
            Joe
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: