Skip to content

Commit

Permalink
Revert tmpdir (#40312)
Browse files Browse the repository at this point in the history
* Revert "Configure TMP for test nodes on Windows (#39959)"
This reverts commit 97562a8.

* Configure a tmp dir without spaces
* Pass on TMP instead of changing it
  • Loading branch information
alpar-t authored Mar 26, 2019
1 parent 9bbc123 commit 2a60ba6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,10 @@ class ClusterFormationTasks {
node.args.each { arg(value: it) }
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// Having no TMP on Windows defaults to C:\Windows and permission errors
// Since we configure ant to run with a new environment above, we need to set this to a dir we have access to
File tmpDir = new File(node.baseDir, "tmp")
tmpDir.mkdirs()
env(key: "TMP", value: tmpDir.absolutePath)
// Since we configure ant to run with a new environment above, we need to explicitly pass this
String tmp = System.getenv("TMP")
assert tmp != null
env(key: "TMP", value: tmp)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion distribution/src/bin/elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source "`dirname "$0"`"/elasticsearch-env

ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
JVM_OPTIONS=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_JVM_OPTIONS"`
ES_JAVA_OPTS="${JVM_OPTIONS//\"\$\{ES_TMPDIR\}\"/$ES_TMPDIR} $ES_JAVA_OPTS"
ES_JAVA_OPTS="${JVM_OPTIONS//\$\{ES_TMPDIR\}/$ES_TMPDIR} $ES_JAVA_OPTS"

# manual parsing to find out, if process should be detached
if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' > /dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion distribution/src/config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true

-Djava.io.tmpdir="${ES_TMPDIR}"
-Djava.io.tmpdir=${ES_TMPDIR}

## heap dumps

Expand Down

0 comments on commit 2a60ba6

Please sign in to comment.