Revert tmpdir (#40312)
* Revert "Configure TMP for test nodes on Windows (#39959)" This reverts commit 97562a874fcb1f29fb05272ab860a0307e97d1aa. * Configure a tmp dir without spaces * Pass on TMP instead of changing it
This commit is contained in:
parent
d50305bbee
commit
b5a8de9a7f
|
@ -721,10 +721,10 @@ class ClusterFormationTasks {
|
||||||
node.args.each { arg(value: it) }
|
node.args.each { arg(value: it) }
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
// Having no TMP on Windows defaults to C:\Windows and permission errors
|
// 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
|
// Since we configure ant to run with a new environment above, we need to explicitly pass this
|
||||||
File tmpDir = new File(node.baseDir, "tmp")
|
String tmp = System.getenv("TMP")
|
||||||
tmpDir.mkdirs()
|
assert tmp != null
|
||||||
env(key: "TMP", value: tmpDir.absolutePath)
|
env(key: "TMP", value: tmp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ source "`dirname "$0"`"/elasticsearch-env
|
||||||
|
|
||||||
ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
|
ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
|
||||||
JVM_OPTIONS=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_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
|
# manual parsing to find out, if process should be detached
|
||||||
if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' > /dev/null; then
|
if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' > /dev/null; then
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
-Dlog4j.shutdownHookEnabled=false
|
-Dlog4j.shutdownHookEnabled=false
|
||||||
-Dlog4j2.disable.jmx=true
|
-Dlog4j2.disable.jmx=true
|
||||||
|
|
||||||
-Djava.io.tmpdir="${ES_TMPDIR}"
|
-Djava.io.tmpdir=${ES_TMPDIR}
|
||||||
|
|
||||||
## heap dumps
|
## heap dumps
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue