Skip to content

Commit

Permalink
[CLOUD-3188] Move GC logs to PREPEND_JAVA_OPTS to bypass the specific…
Browse files Browse the repository at this point in the history
… EAP checks
  • Loading branch information
yersan committed Dec 5, 2019
1 parent 140cbd9 commit e280a8f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export GC_MAX_METASPACE_SIZE=${GC_MAX_METASPACE_SIZE:-256}

JAVA_OPTS="$(adjust_java_options ${JAVA_OPTS})"

# CLOUD-3188 if JAVA_DIAGNOSTICS and the JDK specific diagnostics contain any GC log configuration, move the settings to PREPEND_JAVA_OPTS
# to bypass the specific EAP checks done on JAVA_OPTS in standalone.sh that could remove the GC EAP specific log configurations
JDK_DIAGNOSTICS=$(jvm_specific_diagnostics)
if [ "x$JAVA_DIAGNOSTICS" != "x" ] && [ "x{JDK_DIAGNOSTICS}" != "x" ] && grep -q "\-Xlog:gc" <<< "${JDK_DIAGNOSTICS}"; then
JAVA_OPTS=${JAVA_OPTS/${JDK_DIAGNOSTICS} /}
PREPEND_JAVA_OPTS="${PREPEND_JAVA_OPTS} ${JDK_DIAGNOSTICS}"
fi

# Make sure that we use /dev/urandom (CLOUD-422)
JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom"

Expand Down

0 comments on commit e280a8f

Please sign in to comment.