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

Temporary files should not be created in the bundles root directory under JENKINS_HOME

XMLWordPrintable

      This plugin includes an automatic bundle generation on the Jenkins instance FS every hour.

      com.cloudbees.jenkins.support.configfiles.SecretHandler#findSecrets generates temporary files in SupportPlugin.getRootDirectory():

      File patchedFile = File.createTempFile("patched", ".xml", SupportPlugin.getRootDirectory());
      

      If JENKINS_HOME is using a network shared FS (NFS, EBS, GlusterFS, whatever), the creation of those temporary files gets unnecessarily synced over the network.
      And if something on "the other side" starts reading this file (imagine a backup service, or whatever), then for instance this will end up creating dozens of .nfs132435434543 files for deleted files on one node (but being read somewhere else).

      We should find a way to put those files elsewhere than under JENKINS_HOME, maybe under java.io.tmpdir but this had been judged problematic for security reasons (as those Components are processing config.xml and the likes that may contain secrets)

            batmat Baptiste Mathus
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: