We should ignore java.io.tmpdir and override it with ES_TMPDIR. I think that variable should be taken into account from the beginning of startup scripts (including JavaVersionChecker) and the value should be applied as java option to all java processes.
Java processes started before ES_JAVA_OPTS are parsed (JavaVersionChecker, TempDirectory, JvmOptionParser) can also create temporary files in /tmp if not provided with java.io.tmpdir
Most notably TempDirectory if ES_TMPDIR is not set will create a temporary dir in that directory - trying to find out system default tmp dir.
JavaVersionChecker and TempDirectory are run before JvmOptionParser is executed, hence these cannot know if java.io.tmpdir was set in jvm.options.
We should ignore java.io.tmpdir and override it with ES_TMPDIR. I think that variable should be taken into account from the beginning of startup scripts (including JavaVersionChecker) and the value should be applied as java option to all java processes.
Java processes started before ES_JAVA_OPTS are parsed (JavaVersionChecker, TempDirectory, JvmOptionParser) can also create temporary files in /tmp if not provided with java.io.tmpdir
Most notably
TempDirectoryif ES_TMPDIR is not set will create a temporary dir in that directory - trying to find out system default tmp dir.JavaVersionCheckerand TempDirectory are run before JvmOptionParser is executed, hence these cannot know if java.io.tmpdir was set in jvm.options.