Removing a template from the EC2 plugin while a job is still building causes a file leak

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

XMLWordPrintable

      Issue: When a job is running on a template from EC2 and then you go and change or delete that template it causes a file leak of files `($INSTANCE_ID)/slave.log.*` which are the traditional log files open for agents but they are not cleaned up ever afterwards and as the agent is running it opens more and more of these file handles until eventually the whole instance crashes or the build is done (the files are not released at that point but they do not continue to increase)

      Steps to reproduce:
      1. Create a EC2 cloud
      2. Create a template within that cloud
      3. Create a job which takes a long period of time and uses that template
      4. Run that job
      5. Delete the template
      6. Observe the file handles continue to increase and you can find many file handles of the format above

      What I would normally expect:
      I think the file handles being opened is OK but they should not continue to re-open. Also they should be cleaned up when the job is done and the agent goes away

      I have not been able to reproduce locally with the code using hpi:run as of yet so I am not sure what is causing the leak

            Assignee:
            FABRIZIO MANFREDI
            Reporter:
            Alex Taylor
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: