Additional handling of ES_GC_LOG_FILE

This commit adds handling of the old ES_GC_LOG_FILE environment variable
to treat it like the other removed environment variables.
This commit is contained in:
Jason Tedor 2016-04-12 21:16:36 -04:00
parent bdfa063946
commit 27867c729d
4 changed files with 3 additions and 4 deletions
distribution
deb/src/main/packaging/init.d
src/main/resources/bin

@ -67,9 +67,6 @@ CONF_DIR=/etc/$NAME
# Maximum number of VMA (Virtual Memory Areas) a process can own
MAX_MAP_COUNT=262144
# Path to the GC log file
#ES_GC_LOG_FILE=/var/log/elasticsearch/gc.log
# Elasticsearch PID file directory
PID_DIR="/var/run/elasticsearch"

@ -67,7 +67,8 @@ if [[ !(-z "$ES_MIN_MEM" &&
-z "$ES_HEAP_NEWSIZE" &&
-z "$ES_DIRECT_SIZE" &&
-z "$ES_USE_IPV4" &&
-z "$ES_GC_OPTS") ]]; then
-z "$ES_GC_OPTS" &&
-z "$ES_GC_LOG_FILE") ]]; then
echo "Error: encountered environment variables that are no longer supported"
echo "Use jvm.options or ES_JAVA_OPTS to configure the JVM"
unsupported_environment_variable "$ES_MIN_MEM" ES_MIN_MEM "set -Xms$ES_MIN_MEM in jvm.options or add \"-Xms$ES_MIN_MEM\" to ES_JAVA_OPTS"
@ -77,6 +78,7 @@ if [[ !(-z "$ES_MIN_MEM" &&
unsupported_environment_variable "$ES_DIRECT_SIZE" ES_DIRECT_SIZE "set -XX:MaxDirectMemorySize=$ES_DIRECT_SIZE in jvm.options or add \"-XX:MaxDirectMemorySize=$ES_DIRECT_SIZE\" to ES_JAVA_OPTS"
unsupported_environment_variable "$ES_USE_IPV4" ES_USE_IPV4 "set -Djava.net.preferIPv4Stack=true in jvm.options or add \"-Djava.net.preferIPv4Stack=true\" to ES_JAVA_OPTS"
unsupported_environment_variable "$ES_GC_OPTS" ES_GC_OPTS "set ${ES_GC_OPTS// / and } in jvm.options or add \"$ES_GC_OPTS\" to ES_JAVA_OPTS"
unsupported_environment_variable "$ES_GC_LOG_FILE" ES_GC_LOG_FILE "set -Xloggc:$ES_GC_LOG_FILE in jvm.options or add \"-Xloggc:$ES_GC_LOG_FILE\" to ES_JAVA_OPTS"
exit 1
fi
# end TODO: remove for Elasticsearch 6.x